Can I automatically increment the file build version when using Visual Studio?

后端 未结 25 3009
-上瘾入骨i
-上瘾入骨i 2020-11-22 14:32

I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005).

If I look up the properties of sa

25条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 15:28

    open up the AssemblyInfo.cs file and change

    // 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")]
    

    to

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

    you can do this in IDE by going to project -> properties -> assembly information

    This however will only allow you to auto increment the Assembly version and will give you the

    Assembly File Version: A wildcard ("*") is not allowed in this field

    message box if you try place a * in the file version field.

    So just open up the assemblyinfo.cs and do it manually.

提交回复
热议问题