Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting TFS to put the changeset in the assembly version

I have got a Team Foundation Server Build running cleanly. It produces several assemblies and I would like the assemblies versions to have the last number to be the changset number. That is, if I commit with a changeset11667 for example the assembly version number should be "x.y.z.11667". I've checked the availible macros, but none is the changeset number.

I would still like to be able to build the solution file on my dev machine as normal, just using the checked in version number.

How would I go about getting this in place?

like image 473
vidstige Avatar asked Apr 18 '12 09:04

vidstige


2 Answers

Realize that this will stop working once you exceed 65,535 changesets. Perhaps you want to update some other field. BTW, yes, build engineering is engineering. Pointing at a solution and telling it to build is only the beginning of the journey.

like image 61
Christopher Painter Avatar answered Oct 08 '22 00:10

Christopher Painter


Have a look at the Community TFS Build Extension project on CodePlex. It contains an AssemblyInfo activity and the TfsVersion activity that are capable of changing the assembly info during the build process using a custom format.

To have it build on your dev machine you have to implement those build extensions on your own using batch files and the TFS command line utilities.

like image 26
PVitt Avatar answered Oct 08 '22 00:10

PVitt