TFS 2010 – building an older changeset

In case you ever want/need to run a build with a version other than ‘latest’, here’s how:

  • Switch to Parameters tab
  • Expand the ‘Advanced’ options
  • Input the version for the ‘get’ operation

The version can be anything that the ‘get’ operation supports, so a datetime, a label, a changeset, etc (it just passes the string along).  For a changeset, you can put in either just the number or prefixed with a ‘C’ (the get version parsing assumes a bare int is a changeset number).

So, to queue a build for changeset 5384, I did:

clip_image002[4]

Advertisements

2 thoughts on “TFS 2010 – building an older changeset

    • Great question!

      The ‘Get Version’ can be in any version specification format that TFS supports. Since I wanted to specify by changeset, I used the leading C, but you can do a date or datetime by using a leading D.

      For instance, D2012-11-03T14:00 would be the version as of 2pm local time (local to the build server) on November 3, 2012. The string (after the D) is just passed to DateTime.Parse, so you can use anything it accepts. Just remember that if you only specify a date, that means 00:00:00 for the time, which is the start of the day, not the end (many people think of midnight as the end of a day instead of the start of one)

      You can see the formats accepted here:

      http://msdn.microsoft.com/en-us/library/gg490833.aspx#VersionSpecs

Comments are closed.