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

后端 未结 25 3024
-上瘾入骨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:19

    I have created an application to increment the file version automatically.

    1. Download Application
    2. add the following line to pre-build event command line

      C:\temp\IncrementFileVersion.exe $(SolutionDir)\Properties\AssemblyInfo.cs

    3. Build the project

    To keep it simple the app only throws messages if there is an error, to confirm it worked fine you will need to check the file version in 'Assembly Information'

    Note : You will have to reload the solution in Visual studio for 'Assembly Information' button to populate the fields, however your output file will have the updated version.

    For suggestions and requests please email me at telson_alva@yahoo.com

提交回复
热议问题