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

Table of Contents

NuGet Installer build runner allows to pull NuGet packages required to build your project without having to commit them into the version control, which comes in handy especially when using a DVCS, like Mercurial or Git. Also it can (optionally) automatically update package dependencies to the most recent ones. Learn more about the problem and existing workarounds.


  • Make sure that sources that you check out from VCS (VCS Settings) include the folder called packages from your solution folder.

To configure NuGet Installer:

  1. Select NuGet version to use from the NuGet.exe drop-down list (if you have installed NuGet beforehand), or specify custom path to NuGet.exe.
  2. Specify NuGet package sources, for example your own NuGet repository. In case you're using TeamCity as NuGet repository, specify %teamcity.nuget.feed.server% here. If you leave this field blank, NuGet will use by default to search for your packages.
  3. Specify path to your solution file (.sln) where packages should be installed.
  4. If needed, select additional options:
    • Exclude version from package folder names: Equivalent to -ExcludeVersion NuGet commandline argument. If enabled, the destination folder will contain only the package name, not the version number.
    • Update packages with help of NuGet update command: Uses NuGet update command to update all packages under solution. Package versions and constraints are taken from packages.config files.

      Starting with TeamCity 7.1 it is no longer required to have packages/repository.config file under solution. TeamCity uses Visual Studio solution file (.sln) to create the full list of NuGet packages to install. It also supports Solution-Wide packages, from .NuGet/packages.config file. You can opt to update packages for entire solution of per packages.config files.

    • Perform safe update: Equivalent to -Safe NuGet option, that looks for updates with the highest version available within the same major and minor version as the installed package.

Note, that for installing and updating packages we use NuGet.exe install and NuGet.exe update commands respectively. See NuGet documentation.

If you have added NuGet Installer to your build configuration, you will probably want to know the exact versions of packages used in builds. For this purpose, there's a NuGet Packages tab for every finished build that lists packages used.

See also:

Administrator's Guide: NuGet Pack | NuGet Publish