Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
Release Management provides the option to trigger a release from a build. But to use this feature, some additional logic has to be added to the default build process template. You can refer to my previous post on doing this with the default build process templates for TFS 2013. This article details how to make the necessary modifications specifically for the UpgradeTemplate.xaml.
If you are using the default UpgradeTemplate.xaml build process template all you need to do is use the corresponding ReleaseUpgradeTemplate.xaml build process template.
If you have customized the default UpgradeTemplate.xaml build process template, then you can use the snippets file (ReleaseUpgradeTemplate.Snippets.xaml) to help you integrate the release-specific customizations into your own custom UpgradeTemplate.xaml build process template.
The snippets file (ReleaseUpgradeTemplate.Snippets.xaml) only contains sections with start / end markers to indicate which parts to copy.
The following is a sample section with start / end tags that is surrounded by some context.
<x:Members> <!-- RM : START –> <x:Property Name="ConfigurationsToRelease" Type="InArgument(s:String)" /> <x:Property Name="ReleaseBuild" Type="InArgument(x:Boolean)" /> <x:Property Name="ReleaseTargetStage" Type="InArgument(x:String)" /> <!-- RM : END --> </x:Members>
Where <x:Members> ... </x:Members> indicate the context and everything between the start / end tags indicates what to copy as is (yellow).
The only exception is the Activity element, where you will need to copy the attributes in the snippets file and add them to your custom build process template, without removing any existing attributes.
<Activity this:Process.ReleaseBuild="False" xmlns:mtc="clr-namespace:Microsoft.TeamFoundation.Client;assembly=Microsoft.TeamFoundation.Client" xmlns:mw="clr-namespace:Microsoft.Win32;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib">
Consider the following when using the ReleaseUpgradeTemplate.xaml build process template.
What if we are using the default template with xaml?
In the first paragraph of this post I make reference to my previous post, which covers exactly that. Refer to the following link.
Updated ReleaseUpgradeTemplate.zip to add support for processing ".token" files as part of your build.