Set build name/label in build process in Team Foundation Server 2013

4.7k views Asked by At

I'm trying to edit my build template to set the build name to be the same as my msi name. My msi-file is created with wix with a name "Product 1.0.0..msi" and I want the "Product 1.0.0." to be the build name in TFS instead of the normal "$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)".

The assembly-version on the output of MSBuild is also correct, so a solution using that is acceptable too.

Is this possible to do in a custom build template in Visual Studio? Anyone who have done this?

2

There are 2 answers

0
MrHinsh - Martin Hinshelwood On BEST ANSWER

If you edit the build definition and go to the process tab you should change the build number to $(build and)_1.0.0$(Rev:.r) which will give you the number then get the TF Version activity from the TFS Community Build Tools on codeplex. Then you can configure TF Version in "Get Version" mode to populate the variable. With that you have to put something in there to update the msi file.

http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20TfsVersion%20build%20activity&referringTitle=Documentation

3
egomesbrandao On

Right button on build definition on Team Explorer, and "Edit Build Definition..." submenu. Rename the field "Build Definition Name:", like this:

enter image description here