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

Table of Contents

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

Icon

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 or 2008 solution file please use the sln2005 or sln2008 runner (since TeamCity 5.1 use Visual Studio (sln) for both Microsoft Visual Studio 2005 and 2008 solution files).

General Build Runner Options

Option

Description

Build runner

Select MSBuild from the drop-down list.

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).

Icon

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 http://msdn.microsoft.com/en-us/library/bb383796(VS.100).aspx

Run platform

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

Targets

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.

NUnit Test Settings

NUnit tests settings

Use this section to specify NUnit parameters

NUnit runner

From the drop-down list select a version of the NUnit runner to use.

.NET Runtime

From the Platform drop-down select the desired execution mode on a x64 machine. Supported values are: Auto (MSIL) (default), x86 and x64. From the Version drop-down select the desired .NET Framework version.

Run tests from

Specify the .Net assemblies, where the NUnit tests to be run are stored. Multiple entries are comma-separated; usage of MSBuild wildcards is enabled.
In the following example, TeamCity will search for the tests assemblies in all project directories and run these tests.

Icon

All these wildcards are specified relative to path that contains the solution file.

Do not run tests from

Specify .Net assemblies that should excluded from the list of found assemblies to test. Multiple entries are comma-separated; usage of MSBuild wildcards is enabled.
In the following example, TeamCity will omit tests specified in this directory.

Icon

All these wildcards are specified relative to path that contains the solution file.

NUnit categories include

Specify NUnit categories of tests that should be run. Multiple entries are comma-separated.

NUnit categories exclude

Specify NUnit categories that should be excluded from the tests to be run. Multiple entries are comma-separated.

MSTest Settings

Option

Description

Run MSTests

Check the box to enable running MSTest tests. If the option is not checked only NUnit test runner will be used.

Path to MSTest.exe

A path to MSTest.exe file. By default Build Agent will autodetect MSTest installation. You may use %system.MSTest.8.0%, %system.MSTest.9.0% or %system.MSTest.10.0% to refer to build agent auto-detected MSTest.exe.

List assembly files

A list of assemblies to run MSTests on. Will be mapped to /testcontainer:file argument.

MSTest run configuration file

Specify a MSTest run configuration file to use (/runconfig:file).

MSTest metadata

Enter a value for /testmetadata:file argument.

Testlist from metadata to run

Every line will be translated into /testlist:line argument.

Test

Names of the tests to run. This option will be translated to the series of /test: arguments
Check Add /unique commandline argument to add /unique argument to MSTest.exe

Results file

Enter a value for /resultsfile:file commandline argument.

Additional commandline parameters

Enter an additional commandline parameters for MSTest.exe

Please, note that tests run with MSTest are not reported on-the-fly.
For more details on configuring MSTests, please refer to the MSTest.exe Command-Line Options

Code Coverage

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



See Also: