views:

178

answers:

2

Hello,

can someone please tell me how I can get the changeset number, the current build of TFS 2010 was triggered for?

I want to extend the build worklfow if the build was triggered by a checkin and want to do some more processing for which I need the changesetnumber of the changeset that was created by the checkin.

Any ideas?

Thx!

A: 

Using an extension from http://msbuildtasks.tigris.org/, you can do this with the TfsVersion task in the Build project:

   <MSBuild.Community.Tasks.Tfs.TfsVersion LocalPath="$(SolutionRoot)">
      <Output TaskParameter="Changeset" PropertyName="Revision" />
    </MSBuild.Community.Tasks.Tfs.TfsVersion>
Russ
Thx but I said that i want to extend the --> workflow <--. The time where I need the changesetnumber is within the phase where the workflow is not running on a selected agent.
Scordo
+1  A: 

I found the Solution. The Changesetnumber for which the build is triggered is populated in the Variable: BuildDetail.SourceGetVersion

Scordo