Assembly File Version not changing?

后端 未结 2 1473
梦如初夏
梦如初夏 2021-02-05 05:48

I have in my assemblyinfo.cs class the code:

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

Calling S

2条回答
  •  旧巷少年郎
    2021-02-05 06:06

    Patrick already gave the correct answer, but here is just a little advice. If you look into AssemblyInfo.cs you'll find the following block at the end:

    // Version information for an assembly consists of the following four values:
    //
    //      Major Version
    //      Minor Version 
    //      Build Number
    //      Revision
    //
    // You can specify all the values or you can default the Build and Revision Numbers 
    // by using the '*' as shown below:
    //[assembly: AssemblyVersion("1.0.*")]
    [assembly: AssemblyVersion("1.0.0.0")]
    [assembly: AssemblyFileVersion("1.0.0.0")]
    

    Now go on and flip the comment from the last three lines as follows:

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

    And everything works as expected... :-)

提交回复
热议问题