Adjust the ReleaseTfvcTemplate.12.xaml build template to work with the BizTalk Deployment Framework

If you want to use the BizTalk Deployment framework in combination with Release Management you need to adjust the default build template that comes with Release Management.

If you did not find it already you can find the default build template in the installation folder of release management.

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\Client\bin\ReleaseTfvcTemplate.12.xaml

Copy this template to TFS and open it to make a small adjustment. In the workflow explorer Navigate to the following sequence component:

“Overall Build Process” – “Run on Agent” – “Try” – “Compile, Test and Publish”.

Whit this component selected, select “Variable” in the lower left corner.

image

In the popup window create a new “Variable” by clicking “Create Variable” and call it “BinariesDirectory” and make it of the type “String”.

image

This variable will be used to save the directory in which the Deployment Framework components can be found.

Next step is to add a “GetEnviromentVariable<T>” action just above the “Run MSBuild” action. Select the type “String” and call the action “Get Binaries Directory”.

To get the Binaries Directory we want to make use of a WellKnownEnvironmentVariable (MSDN). To use such a variable you need to import a assembly reference. You can add a assembly reference by clicking on “Import” next to “Arguments” in the footer of the workflow screen.

image

Import the “Microsoft.TeamFoundation.Build.Activities.Extensions” namespace to make use of the WellKnownEnvironmentVariables. Know you can set the properties of the “Get Binaries Directory” action to get the “WellKnownEnvironmentVariables.BinariesDirectory” environment variable.

image

With this value we can change the MSBuild argument to build the MSI from the BizTalk Deployment Framework. Select the “Run MSBuild” action and adjust the “CommandLineArguments” property to the following value.

String.Format("/p:SkipInvalidConfigurations=true;TeamBuildOutDir=""{0}"" {1}", BinariesDirectory, AdvancedBuildSettings.GetValue(Of String)("MSBuildArguments", String.Empty))

Save and Check In the build template. If you use this build template to define a build definition you are able to use a Release within Release Management that uses the output of this build.

One thing to keep in mind that you will have to set the following properties on your build definition:

  • MSBuild platform: X86
  • Output location: AsConfigured

image

Related Posts

Release Management in Visual Studio Team Services Visual Studio Team Services is the formally know Visual Studio Online. The old name brought a lot of confusion I think the new name will do a lot bett...
Creating the Release Template that runs after the Build – Part 3 With the component created in part 2 we can start using it to deploy applications to our SharePoint environment. We start by creating a new template. ...
Create a custom component to deploy SharePoint Solutions – Part 2 In the first part of the series we have adjusted a build template in order to copy content from source control to the drop location after the build. T...
Customize the Release Management Build template – Part 1 To setup a build in combination with Release Management you need the Release Management build template. This template looks like the default build tem...
Deploy SharePoint Solutions with Release Management In one of my previous post (Configuring Web Site Binding with Release Management) I showed how you can make a custom action for Release Management to ...
Configuring Web Site Binding with Release Management Release Management provides a continuous deployment solution that makes release cycles repeatable, visible, and more efficient by automating deploymen...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.