CS1607: The version specified for the 'file version' is not in the normal 'major.minor.build.revision' format in .NET

故事扮演 提交于 2019-11-29 05:26:25
Cody Gray

You're assuming that the problem is with this line:

[assembly: AssemblyVersion("3.0.*")]

when it is actually with this one:

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

Like the accepted answer to the question that you say is not a duplicate of this one says:

For the AssemblyFileVersionAttribute you cannot use the * special character so you have to provide a full and valid version number.

That * syntax works only with the AssemblyVersion attribute. It doesn't work with the AssemblyFileVersion attribute.

There are two workarounds to achieve the results you probably desire here:

  1. Simply omit the AssemblyFileVersion attribute altogether. That will cause the assembly file version information to be automatically divined from the AssemblyVersion attribute (which is the one that does support the * syntax).

  2. Break out the big guns and install the Build Version Increment add-in, which offers you more version incrementing options than you can shake a stick at.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!