AssemblyInfo version information asterisks

前端 未结 4 1714
梦毁少年i
梦毁少年i 2020-12-25 09:54

It says in AssemblyInfo.cs for C# projects that it\'s possible to specify version information with *

// Version information for an assembly cons         


        
4条回答
  •  轮回少年
    2020-12-25 10:42

    Syntax (see MSDN) for "automatic" build number can be:

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

    or:

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

    * means after this everything is automatic. You can't have automatic build number and fixed revision number then this syntax isn't correct:

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

    For the AssemblyFileVersionAttribute you cannot use the * special character so you have to provide a full and valid version number. Please note that if you do not provide an AssemblyFileVersionAttribute then you'll get the right FileVersionInfo automatically (with the same version of AssemblyVersionAttribute). You need to specify that attribute only if you need to set a different version.

提交回复
热议问题