Home > ALM, TFS, TFS2012 > Customize Build Template in TFS2012 to Build All Solutions-Part 1

Customize Build Template in TFS2012 to Build All Solutions-Part 1


Introduction

In this article, I will show one way to build all solutions in source control. I will add a new argument to a build template which holds a comma separated string of solutions and I will be using a tool I built in the previous post (can be found here). In the next article, I will reuse the code to build a UIEditor to edit the argument we are passing to the build definition.

Modify the Build Template

In Team Explorer, click on the Source Control Explorer.

image

Open your build template. Here I am opening a clone of the Default template.

image

Click on the Arguments tab at the bottom and scroll down. Then click on Create Argument.

image

Rename the argument to Solutions. The argument will hold comma separated string of solutions.

image

Collapse the Arguments tab by clicking on it.

One of the new features in Visual Studio 2012 is the ability to search or find text in a Work Flow document. Press ctrl + F and find BuildSettings.ProjectsToBuild.

image

There are two instances that need to be replaced with Solutions.Split(“,”c), VB code Smile: One in the Clean Configuration sequence and the other in Compile and Test for Configuration sequence. While you are there, change the Display Name the For Each loop if you want to.

image

Save and Check in.

image

Modify Build Definition

Go to Builds in Team Explorer.

image

Edit an existing build or create a new build definition.

image

Go to the process tab, expand Show Details.

From the drop down select the Build process File you modified.

image

Launch the tool that finds all solutions in source control (Check this article).

Copy the found solutions.

image

Paste the copied value into the Solutions argument.

image

Save and queue a build

image

In my repository, I have 6 solutions and they all got built 🙂

image

In part two, I will create a UI Editor to avoid launching the solutions finder tool.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: