New features in Team Build 2013 4

New features in Team Build 2013

Microsoft has release a preview of Team Foundation Server 2013 and Visual Studio 2013. You can download this preview here:

In this post i’ll present you what has changed around Team Build. Be careful, the information provided here are based on a preview version and could change in the final version.

Installation, configuration and monitoring

The general architecture of Team Foundation Build hasn’t evolved with this new version, we still have build agents connected to a build controller connected to a team project collection. Since the architecture hasn’t changed, the services hasn’t changed either. To summarize the following elements hasn’t changed:

  • The installation process
  • The service configuration
  • The build controller configuration
  • The build agent configuration
  • The UI to manage and monitor builds (Team Explorer and Web Access)

So if the infrastructure hasn’t why did I decided to write this post? :)

Build template

The new features comes from the default build templates and the build activities used by those.


With this new version of TFS Microsoft has entirely reviewed its default build template and the activities it uses. Here’s a screen shot of the template in Visual Studio 2013 editor:


As you can see the workflow is more compact and linear. This is due to a simplification of the workflow and the rewrite of the activities to integrate part of the logic which was previously in the workflow. Some noticeable new activities:

  • RunMsBuild which now do all the processing of the for loop to compile each specified platforms and configurations;
  • RunAgileTestRunner which nos do all the processing to find test assemblies and execute them for each specified platforms and configurations;
  • RunPublishSymbols which now do all the processing to find PDBs, index and publish them.

Another new feature in this template is the new RunScript activity and how it is used inside the workflow. This new activity can execute a command line or PowerShell script. To see its integration the easiest solution is to look at the parameters of this new workflow:


The number of parameters has also diminished and some grouping was done; now all advanced parameters for build and tests or in their own distinct settings object which simplifies the parameter view and organization.

We also find new parameters for the RunScript activities:

  • Pre-build script path and pre-build script arguments: enables you to execute a script before the compilation of all solutions/projects in all defined configuration and platform;
  • Post-build script path and post-build script arguments: enables you to execute a script after the compilation of all solutions/projects in all defined configuration and platform;
  • Pre-test script path and pre-test script arguments: enables you execute a script before the execution of all test assemblies in all defined configuration and platform;
  • Post-test script path and post-test script arguments: enables you execute a script after the execution of all test assemblies in all defined configuration and platform.

This brings a new way to customize your build process, instead of customizing the workflow in XAML we can now have a common stable structure and create post and pre actions scripts to add our specific behaviors like organizing the output binaries, updating the version number or executing compilations which do not use MsBuild.

Using scripts will also answer a need we could not satisfy with the current customization: execute a build on an old source version using the build workflow of the same time. Team Build always use the latest version of the build workflow whatever version of the source we’re using, but the latest version of the build workflow could be incompatible with our old source code. Using scripts inside the workspace guarantees that the scripts will match the source code version.

Another new parameter is the OutputLocation parameter:


This parameter enables you to specify how Team Build will override the OutDir MsBuild parameter:

  • SingleFolder: this is the default value, all projects are compiled with inside a single output directory. This is the standard mode of Team Build.
  • PerProject: each solution/project defined in the Projects parameters has it’s own output directory. This replaces the 2012 parameter “Solution Specific Build Outputs”.
  • AsConfigured: the projects are compiled as specified in the project file, it will be as compiling on a workstation.

With the new AsConfigured value and the post-build script we can finally easily manage how our binaries will be package after a build using Team Build :) !


With Team Foundation Service, Microsoft has added support for Git ( as a version control system for TFS. Git is a distributed version control system contrary to TFS historical version control which is centralized. The centralized version control system of TFS is still there as and is named TFVC.

With the 2013 version of Team Foundation Server, Microsoft has intregrated Git for on-premises installation. To support this new version control system in Team Build, a new build template was added and a new build definition UI too:


The Source tab was updated to display Git specific parameters:

  • The repository name
  • The branch to use
  • The branch to monitor for continuous integration

A the build workflow we find the same process as TFVC builds except for the get source part which is done against Git using a specific activity:



For those how want to customize the build workflow to add new parameters for example, there are new features which will be handy at the metadata level:


First you can see that all Microsoft default parameters are now displayed in the metadata collection which will be extremely useful if you need/want to customize them.

You can now define metadata for each properties of a complex parameter type by using the Parameter.Property syntax.

There is a new syntax for your parameters editor to simplify some basic case like:

  • Displaying a drop down list of string values: @DropDownList=value1,value2,value3
  • Displaying/editing for basic types: @Type=TimeSpan

For complex parameter you have a new “Value format string” metadata to customize the string which is displayed at the object root (before you needed to overwrite the ToString method of the object). This new metadata accepts some placeholders for property values using the {PropertyName} syntax.


Thats all for this post :)

Note that all these information are based on the Preview version of Team Foundation Server 2013 and could be a little bit different in the release version.

Carpe Diem.

4 thoughts on “New features in Team Build 2013

  1. Reply stavn Aug 5,2014 09:54

    I cannot find further information on the @ syntax in the Editor field of the workflow metadata. Are there any other possibilities, like presenting a drop down with dynamic values coming from a custom assembly or a webservice? Or do I need to create an editor.

  2. Reply Guillaume Rouchon Aug 5,2014 17:32

    I haven’t found any documentation on this syntax, my post i done on what i’ve found by myself. Based on that i don’t think you can have dynamic values in @DropDownList.

    If you need dynamic values you will have to create your own editor and deploy it on every workstation where you need to edit the build definition.

  3. Reply SteveSims Dec 8,2014 14:30

    I am seeing build agents automatically stop and restart builds when the agent is rebooted while they are running. This does not happen for us on our 2012 build machines….the builds are just stopped, not restarted.

    Can you confirm if this really is a new feature of 2013?

  4. Reply Guillaume Rouchon Apr 28,2015 16:54

    Sorry i do not know if this is a new feature of 2013.

Leave a Reply