Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 6.5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.

Table of Contents

This page contains reference information for the MSBuild Build Runner fields.


Before setting up the build configuration to use MSBuild as the build runner, make sure you are using an XML build project file with the MSBuild runner. To build a Microsoft Visual Studio 2005, 2008 or 2010 solution file please use the Visual Studio (sln) build runner).

General Build Runner Options



Build File Path

Specify the path to the solution to be built, relative to the Build Checkout Directory. For example:

Working Directory

Specify the path to the build working directory.

MSBuild version

Select the framework you want to run - either .NET Framework (2.0, 3.5 or 4.0) or Mono xbuild.

MSBuild ToolsVersion

Specify here the version of tools that will be used to compile (equivalent to /toolsversion: commandline argument).


MSBuild supports compilation to older versions, thus you may set MSBuild version as 4.0 with MSBuild ToolsVersion set to 2.0 to produce .NET 2.0 assemblies while running MSBuild from .NET Framework 4.0. For more information refer to

Run platform

From the drop-down list select the desired execution mode on a x64 machine.


Enter targets separated by spaces. A target is an arbitrary script for your project purposes.

Command line parameters

Specify any additional parameters for msbuild.exe

Reduce test failure feedback time

Use the following option to instruct TeamCity to run some tests before others.

Code Coverage

To learn about configuring code coverage options, please refer to the Configuring .NET Code Coverage page.

Implementation notes

MSBuild runner generates an MSBuild script that includes user's script. This script is used to add TeamCity provided msbuild tasks. Your MSBuild script will be included with <Import> task. If you specified a Visual Studio solution file, it will be called from <MSBuild> task. To disable it, set teamcity.msbuild.generateWrappingScript configuration parameter with value false.

See also:

1 Comment

  1. A note on how to make MSBuild run from command line runner report output to TeamCity.