Skip to end of metadata
Go to start of metadata

On this page:

 

TeamCity comes with built-in support of .NET CLI toolchain providing .NET CLI (dotnet) build steps, CLI detection on the build agents, and auto-discovery of build steps in your repository.

This page provides details on configuring the .NET CLI (dotnet) runner. Also see  the related blog post.

Icon
  • .NET Core SDK has to be installed on your build agent machines.
  • The .NET CLI tools path has to be added to the PATH environment variable. You can also configure the DOTNET_HOME environment variable for your TeamCity build agent user, e.g: DOTNET_HOME=C:\Program Files\dotnet\
OptionDescription

Command:

Select a dotnet command from the drop-down. Depending on the selected command, some of the options below will vary. The currently supported commands are:

Projects:

Specify paths to projects and solutions. Wildcards are supported. Parameter references are supported. If you have a finished build, you can use the file/directory chooser here.

Working directory:

Optional, set if differs from the checkout directory. Parameter references are supported. If you have a finished build, you can use the file/directory chooser here.

Framework:

Specify the target framework, e.g. netcoreapp or netstandard. Parameter references are supported.

Configuration:

Specify the target configuration, e.g. Release or Debug. Parameter references are supported.

Runtime:

Specify the target runtime. Parameter references are supported.

Output directory:

The directory where to place outputs.arameter references are supported. If you have a finished build, you can use the file/directory chooser here.

Version suffix:

Defines the value of the $(VersionSuffix) property in the project. Parameter references are supported.

Command line parameters:

Enter additional command line parameters for dotnet.

Logging verbosity:

Select from the <Default>, Minimal, Normal, Detailed or Diagnostic.

Docker Settings

Since TeamCity 2018.1 the .NET CLI build step can be run in a specified Docker container.

Code Coverage

JetBrains dotCover is supported as a coverage tool for the msbuildtest, and vstest commands.

Authentication in private NuGet Feeds

Since 2018.2 TeamCity provides credentials plugin working with NuGet feed v3 API in .NET CLI 2.1.500+.  (NuGet feed v1/v2 are not supported).

It allows using authentication in build-in NuGet feeds or feeds specified in the NuGet feed credentials build features.

Parameters Reported by Agent

When starting, the build agent reports the following parameters:

Parameter
Description
DotNetCLIThe .NET CLI version
DotNetCLI_PathThe path to .NET CLI executable
DotNetCoreSDKx.x_PathThe .NET Core SDK version
  • No labels