Versioning .NET builds

后端 未结 8 1340
萌比男神i
萌比男神i 2020-12-14 22:27

Just wondering what\'s the best approach to versioning of .NET builds?

I use:

  • TFS 2013 for version control
  • TFS gated check-ins
  • Wix 3.
8条回答
  •  时光说笑
    2020-12-14 23:03

    Good grief, all those complicated answers.

    In TFS 2013 this is simple. The Community TFS Build Extensions site offers a simple PowerShell to pull the build number from the build name that is assigned by TFS.

    enter image description here

    You configure your build number format to be "$(BuildDefinitionName)_6.0.0$(Rev:.r)" which will result in something like "6.0.0.1" where the "1" is incremented for each build.

    You then add the PowerShell versioning script to your build and it automagically scrapes the version number above and applies it to all AssemblyInfo.* files in the build folder. You can add additional file types by updating the script.

提交回复
热议问题