Visual studio. AssemblyVersion with * don't work

人走茶凉 提交于 2020-02-18 05:46:07

问题


I can't use * in assembly version

Represents text as sequence of UTF-16 code units.To browse the .NET Framework source code for this type, see the Reference Source.

The specifed version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation


回答1:


I guess you were able to use it earlier and can't anymore.

Reason - There have been some changes to Visual Studio as the new project files now default to 'True' for 'Deterministic' attribute.

Solution - as Hans Passant says, edit project file by hand. Cons to doing it, also as he says.

Source - https://marinovdh.wordpress.com/2018/10/22/68/




回答2:


Add <Deterministic> tag with false value inside <PropertyGroup> in *.csproj file:

<PropertyGroup>
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
    <Version>1.0.0</Version>
    <AssemblyVersion>1.0.0.*</AssemblyVersion>
    <Deterministic>false</Deterministic>
</PropertyGroup>


来源:https://stackoverflow.com/questions/53782085/visual-studio-assemblyversion-with-dont-work

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