TFS Build specific changeset and deploy it using the changeset number
Solution 1
The answer to your first question is clearly what @Dylan has stated.
To your second part:
The important argument is GetVersion
.
Navigate to activity "Run MSBuild for Project" within your Build Process Template, by default this has a value CommandLineArguments
equal to
String.Format("/p:SkipInvalidConfigurations=true {0}", MSBuildArguments)
You can change it to something like
String.Format("/p:SkipInvalidConfigurations=true {0} /p:DeployIisAppPath=/changeset/{1}", MSBuildArguments, GetVersion)
and get where you need to go.
Solution 2
When you queue up the build from Team Explorer, in the Parameters tab one of the Advanced arguments is get version.
Note: I think you need to specify this in the form C123 where 123 is the changeset number.
Comments
-
Konrad almost 2 years
I have a Build Definition to build a solution on my TFS. This works well, but it always builds the latest version.
How can I force to build a specific changeset from the past?
How can I use/pass this number to the "MSBuild Arguments" to use it there for deployment?
-
Konrad over 12 yearsthank you ... that anwsered the first question ... but how can I pass this parameter (C1234) to the MSBuild Arguments to use it for deployment?
-
Dylan Smith over 12 yearsIt's in one of the workflow arguments, you can access that when setting the arguments passed to the msbuild (you'd have to customize the build workflow)
-
Konrad over 12 yearsCreating a new template is the way to go. I only had to change "GetVersion" into "BuildDetail.SourceGetVersion" to get the latest build version :-)
-
Shimmy Weitzhandler about 9 yearsMy current Build process file is set to TfvcContinuousDeploymentTemplate.xaml, however I can't find that file in the BuildProcessTemplates folder.