Wednesday, 2 October 2013

Building Visual Studio 2013 solutions with your TFS 2010 / 2012 Build Templates

Visual Studio 2013 is shipped with a new version of MSBuild. The new version or MsBuild 12.0 contains a number of new features as described here. It is installed separately and from now onwards will be following Visual Studio release cycle rather than .Net Framework’s release cycle.

If you are using Visual Studio 2013 to build say a Windows 8.1 app and are still using your TFS 2010 or TSF 2012 build templates, you might get errors because by default the templates use MSBuild 4.0. To resolve the issue please edit your build templates to do the following

1) Find all instances of the MSBuild activity. The activity is named as “Run MSBuild for Project” within the build templates as shown below

Run MSBuild Activity

2) Change the ToolsPath of the activity to point to the MSBuild 12.0 exe file as shown below

Run MSBuild ToolsPath

The TFS2013 version of this activity (Microsoft.TeamFoundation.Build.Workflow.Activities.MSbuild) contains a “ToolsVersion” property that you can use to set the correct version number but in earlier versions (such as TFS2010 or TFS2012) you will have to resort to pointing to the file location.

5 comments:

Farrukh said...

Thanks for the tip. Saves time to solve an issue where projects were upgraded to use Tool-set version 12.0

Luke said...

This helped out tremendously. In our build template, we had to use ToolVersion rather than ToolsVersion.

Unknown said...

Great blog. This blog is written in such a way that it every individual who read this get plenty of knowledge.

Building Solutions | Building Construction

Unknown said...

Thanks for the such a useful tip. Building construction materials

Unknown said...

I am very happy to visit your site and i did like it. I was able to get some informative topics.Thanks fo share
Building Materials