How can I get MSBuild to increment the ClickOnce publish revision version number on a build server?

后端 未结 3 554
广开言路
广开言路 2020-12-31 17:34

We have an NAnt script that checks out from CVS and then runs MSBuild to publish the application. The problem is we have to remember to always increment the version in Visua

3条回答
  •  时光说笑
    2020-12-31 18:31

    You have several options, here are two:

    1. Specify an asterisks in lieu of the build version number to have it automatically incremented
      http://msdn.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.aspx

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

    2. Use the AsssemblyInfo msbuild task from the MSBuild Extension Pack.
      http://msbuildextensionpack.codeplex.com
      Example:
      http://www.msbuildextensionpack.com/help/4.0.4.0/html/d6c3b5e8-00d4-c826-1a73-3cfe637f3827.htm

    Edit
    Sorry I misread your question.

    See the accepted answer by Jason Stangroome here:
    How do I get the ClickOnce Publish version to match the AssemblyInfo.cs File version?

提交回复
热议问题