程序集文件版本未更改? [英] Assembly File Version not changing?

查看:92
本文介绍了程序集文件版本未更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的assemblyinfo.cs类中包含以下代码:

I have in my assemblyinfo.cs class the code:

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]

调用System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()可以正常工作并提供更新的版本,但是,当我在Windows资源管理器中查看生成的dll时,右键单击属性,单击详细信息"选项卡,即使文件版本显示为"1.0.0.0",上面的输出显示1.0.3489.17621?

Calling System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() works fine and gives the updated version, however, when i look at the generated dll in windows explorer, right click properties, click the 'details' tab, the fileversion says "1.0.0.0" even though the output above says 1.0.3489.17621 ?

推荐答案

您不能使用1.0.*自动递增AssemblyFileVersion,只能使用AssemblyVersion. (已在2005年至2012年的所有Visual Studio版本中进行了检查.)

You cannot use 1.0.* to auto-increment the AssemblyFileVersion, only the AssemblyVersion. (Checked in all Visual Studio versions from 2005 to 2012).

注释以下行

[assembly:AssemblyFileVersion("1.0.*")]

[assembly: AssemblyFileVersion("1.0.*")]

,文件版本号将与程序集版本号相同.

and the File Version will take the same number as the Assembly Version.

这篇关于程序集文件版本未更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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