凡在指定的ASP.NET Web站点的版本号 [英] Where to specify version number in ASP.NET Web Site

查看:317
本文介绍了凡在指定的ASP.NET Web站点的版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个ASP.NET网站(相对于Web应用程序),它没有AssemblyInfo.cs文件或Bin文件夹或类似的东西。

So I have an ASP.NET 'Web Site' (as opposed to a Web Application) which has no AssemblyInfo.cs file or Bin folder or anything like that.

我希望有一种方法来指定程序集的版本号(如7.0.2.0)。在Web应用程序,你会做这在AssemblyInfo.cs文件。

I want to have a way to specify an Assembly version number (e.g. 7.0.2.0). In a Web Application you would do this in an AssemblyInfo.cs file.

我已经尝试添加属性文件夹与AssemblyInfo.cs文件,但我不认为它被拾起 - 因为当我打电话Assembly.GetExecutingAssembly()的GetName()Version.ToString()我得到0.0。 .0.0

I've tried adding a Properties folder with an AssemblyInfo.cs file but I don't think its being picked up - because when I call Assembly.GetExecutingAssembly().GetName().Version.ToString() I get 0.0.0.0

所以:做我必须做的就是AssemblyInfo.cs中工作或如何可以指定一个版本号

So: What do I have to do to get AssemblyInfo.cs working OR how can I specify a version number?

推荐答案

K斯科特·艾伦的此处一个帖子,但我个人建议你移动到一个Web应用程序项目。

K Scott Allen has a post here, but personally i'd recommend you move to a Web Application Project.

这篇关于凡在指定的ASP.NET Web站点的版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆