TeamCity 2019.1 Help

NuGet Publish

The NuGet Publish build runner is intended to publish (push) your NuGet packages to a given feed (custom or default).

This page describes the NuGet Publish runner options:




Select a NuGet version to use from the drop-down list (you need to have NuGet installed), or specify a custom path to NuGet.exe.


Specify a newline-separated list of NuGet package files (.nupkg) to publish to the NuGet feed. List packages individually or use wildcards.

API key

Specify the API key to access a NuGet packages feed.

To publish to the TeamCity NuGet server, specify the %teamcity.nuget.feed.api.key% parameter.

Package Source

Specify the destination NuGet packages feed URL to push packages to, e.g. Leave blank to let NuGet decide what package repository to use. If you are using a TeamCity NuGet feed, select it using the 'magic wand' icon

or manually specify the URL from the NuGet Feed project settings page.

If you work with an authenticated feed, configure the NuGet Feed Credentials build feature.

Since TeamCity 2018.2, TeamCity will use the credentials provider to automatically authenticate requests to build-in NuGet feeds or feeds specified in the NuGet feed credentials build features.
Note that API v1/v2 feeds require NuGet 2.0+; NuGet 3.5+ is recommended. API v3 feeds require NuGet 4.8+ or NuGet 4.9+ on Mono.

Replacing existing package version in TeamCity internal feed

When publishing a package with the same version that already exists in a TeamCity internal NuGet feed, the package will be rejected. To force the TeamCity server to replace the existing NuGet package with a new version, append your feed URL obtainable from the project settings page with the ?replace=true parameter, e.g. http://<Teamcity URL>/httpAuth/app/nuget/feed/NuGet/default/v2?replace=true

Command line parameters

Enter additional parameters to use when calling the nuget push command.

See also:

Administrator's Guide: NuGet Installer | NuGet Pack

Last modified: 11 June 2019