3

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?

Robert
  • 2,357
  • 4
  • 25
  • 46

2 Answers2

1

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

0

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

egomesbrandao
  • 788
  • 6
  • 16
  • So it needs to be done manually? I would prefer that it was done automatically everytime a build i scheduled (since this will give a unique version number). So we can track bugs to each msi built. – Robert Jun 05 '14 at 11:14
  • You want to rename the build definition each time you schedule a build ? I don't understand. Why? You can track build by using the number generated and the version number atributed to assembly. – egomesbrandao Jun 05 '14 at 14:46
  • I want to name the build after the msi version. – Robert Jun 10 '14 at 07:34