Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 10.x and 2017.x Documentation


You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the [listing] to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-25838

On this page:

Table of Contents

Integration Capabilities

TeamCity integrates with NuGet package manager and when NuGet is installed provides the following capabilities:


  • NuGet build runners runners require an appropriate version on .NET Framework installed on the agent machine depending on the NuGet.exe version used: NuGet 2.8.6+ requires .NET 4.5+, earlier NuGet versions require .NET 4.0.
  • To use packages from an authenticated feed, see the NuGet Feed Credentials build feature.

On this page:

Table of Contents


Typical Usage Scenarios



Installing NuGet on agents results in agents upgrade.

NuGet Packages Cache Clean-up on Agents

NuGet uses several local caches to avoid downloading packages that are already installed, and to provide offline support.

Since TeamCity 2017.2 EAP1, if an agent is running out of the space, TeamCity will try to clean NuGet packages cache on the agent.

The caches in the following directories will be cleaned:

  • %NUGET_PACKAGES% environment variable (must be an absolute path)
  • %LOCALAPPDATA%\NuGet\Cache
  • %LOCALAPPDATA%\NuGet\v3-cache
  • %user.home%.nuget\packages

Using TeamCity as NuGet Server



TeamCity running on any of the supported operating systems (Windows, Linux, Mac OS X) can be used as a NuGet Server.

Since TeamCity 9.0 built-in NuGet feed supports API v2 by default.

TeamCity NuGet feed users are recommended to upgrade to TeamCity 10.0.2 and later, as 10.0.2 provides improved compatibility with NuGet.


  • You can publish packages to the feed either as build artifacts of the NuGet Pack build step (using the Publish created packages to build artifacts checkbox, packages will be indexed asynchronously) or via the NuGet Publish build step (since TeamCity 2017.1, packages  packages will be indexed synchronously)

  • You can add TeamCity NuGet server to your repositories in Visual Studio to avoid having to type in long URLs each time you want to read from a specific package repository (add NuGet repository and specify the public URL provided by TeamCity when enabling NuGet server).

  • The packages available in the feed are bound to the builds' artifacts: they are removed from the feed when the artifacts of the build which produced them are cleaned up

  • You do not need to specify credentials for the internal NuGet feed access; if NuGet Feed Credentials are specified, they are ignored.