NuGet frequently-asked questions

In this topic:

Getting started

What is required to run NuGet?

All the information around both UI and command-line tools is available in the Install guide.

Does NuGet support Mono?

The command-line tool, nuget.exe, builds and runs under Mono 3.2+ and can create packages in Mono.

Although nuget.exe works fully on Windows, there are known issues on Linux and OS X. Refer to Mono issues on GitHub.

A graphical client is available as an add-in for MonoDevelop.

NuGet in Visual Studio

How do I check the exact version of NuGet installed?

In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager.

Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.

What languages are supported by NuGet?

NuGet generally works for .NET languages and is designed to bring .NET libraries into a project. Because it also supports MSBuild and Visual Studio automation in some project types, it also supports other projects and languages to various degrees.

The most recent version of NuGet supports C#, Visual Basic, F#, WiX, and C++.

What project templates are supported by NuGet?

NuGet has full support for a variety of project templates like Windows, Web, Cloud, SharePoint, Wix, and so on.

How do I update packages that are part of Visual Studio templates?

Go to the Updates tab in the Package Manager UI and select Update All, or use the Update-Package command from the Package Manager Console.

To update the template itself, you need to manually update the template repository. See Xavier Decoster's blog on this subject. Note that this is done at your own risk, because manual updates might corrupt the template if the latest version of all dependencies are not compatible with each other.

Can I use NuGet outside of Visual Studio?

Yes, NuGet works directly from the command line. See the Install guide and the CLI reference.

NuGet command line

How do I get the latest version of NuGet command line tool?

See the Install guide.

Is it possible to extend the NuGet command line tool?

Yes, it's possible to add custom commands to nuget.exe, as described in Rob Reynold's post.

NuGet Package Manager Console

How do I get access to the DTE object in the Package Manager console?

The top-level object in the Visual Studio automation object model is called the DTE (Development Tools Environment) object. The console provides this through a variable named $DTE. For more information, see Automation Model Overview in the Visual Studio Extensibility documentation.

I try to cast the $DTE variable to the type DTE2, but I get an error: Cannot convert the "EnvDTE.DTEClass" value of type "EnvDTE.DTEClass" to type "EnvDTE80.DTE2". What's wrong?

This is a known issue with how PowerShell interacts with a COM object. Try the following:

`$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])`

Get-Interface is a helper function added by the NuGet PowerShell host.

Creating and publishing packages

How do I list my package in a feed?

See Creating and publishing a package.

I have multiple versions of my library that target different versions of the .NET Framework. How do I build a single package that supports this?

See Supporting Multiple .NET Framework Versions and Profiles.

How do I set up my own repository or feed?

See the Hosting packages overview.

How can I upload packages to my NuGet feed in bulk?

See Bulk publishing NuGet packages (

Working with packages

What is the difference between a project-level package and a solution-level package?

A solution-level package (NuGet 3.x and later) is installed only once in a solution and is then available for all projects in the solution. A project-level package is installed in each project that uses it. A solution-level package might also install new commands that can be called from within the Package Manager Console.

Is it possible to install NuGet packages without Internet connectivity?

Yes, see Scott Hanselman's Blog post How to access NuGet when is down (or you're on a plane) (

How do I install packages in a different location from the default packages folder?

Set the repositoryPath setting in Nuget.Config using nuget config -set repositoryPath=<path>.

How do I avoid checking in packages folder to source control?

Set the disableSourceControlIntegration in Nuget.Config to true. This key works at the solution level and hence need to be added to the $(Solutiondir)\.nuget\Nuget.Config file. Enabling package restore from Visual Studio creates this file automatically.

How do I turn off package restore?

See Enabling and disabling package restore.

Why do I get an "Unable to resolve dependency error" when installing a local package with remote dependencies?

You need to select the All source when installing a local package into the project. This aggregates all the feeds instead of using just one. The reason this error appears is that users of a local repository often want to avoid accidentally installing a remote package due to corporate polices.

I have multiple projects in the same folder, how can I use separate packages.config or project.json files for each project?

In most projects where separate projects live in separate folders, this is not a problem as NuGet identifies the packages.config and project.json files in each project. With NuGet 3.3+ and multiple projects in the same folder, you can insert the name of the project into the packages.config or project.json filenames as below and NuGet uses that file:

`packages.config`: use the pattern `packages.{project-name}.config`
`project.json`: use the pattern `{project-name}.project.json`

This is not an issue when using PackageReference, as each project file contains its own list of dependencies.

I don't see in my list of repositories, how do I get it back?

  • Add to your list of sources, or
  • Delete the %appdata%\.nuget\NuGet.Config and let NuGet re-create it.

Managing packages on

Is it possible to reserve names for packages that will be published in future?

No. If you feel that an existing package has taken the name which suits your package better, try contacting the owner of the package (select on the owner name on the package page on If you don't get a response within a reasonable time, contact support and we'll look into it.

How do I claim ownership for packages ?

See Managing package owners on

How do I deal with a package owner who is violating my software license?

We encourage the NuGet community to work together to resolve any disputes that may arise between package owners and the owners of other software. We have crafted a dispute resolution process to follow before asking administrators to intercede.

Is it recommended to upload my test packages to

For test purposes, you can use, or alternative public NuGet servers like or Visual Studio Team Services.

Note that packages uploaded to may not be preserved. See Goodbye preview.

What is the maximum size of packages I can upload to allows packages up to 250MB, but we recommend keeping packages under 1MB if possible and using dependencies to link packages together. As a rule of thumb, packages contain only one assembly to avoid collisions.

NuGet uses HTTP to download packages, so larger packages have a higher likelihood of failed installs than smaller ones.

It is possible to share dependencies between multiple packages, making the total download size for consumers of your NuGet packages smaller.

Dependencies are mostly static and never change. When fixing a bug in code, the dependencies may not need to be updated. If you bundle dependencies, you end up reshipping larger packages every time. By splitting NuGet packages into related dependencies, upgrades are much more fine-grained for consumers of your package.

Can I edit package information after it's been uploaded?

Yes, in fact, you first get an opportunity to edit package metadata during the upload process. When you upload a package, the NuGet gallery performs some static analysis and indicates issues. If the package is accepted, you see a page that allows you to edit any of the metadata before the package is added to the gallery.

For a package already in the gallery, sign into, select on your username, select Manage my packages, then select the package you want to manage. From that page, select Edit Package on the left-hand side and make the desired changes to the metadata.

Note that dependencies listed for your package are generated automatically from the package itself and cannot be edited.

In addition, uploading packages to is a great way to check your package and test the editing process without making a package available in the public gallery.

Why can't I download packages from or upload packages to

First make sure you're using the latest versions of NuGet. If that continues to fail, contact support and provide additional connection troubleshooting information including:

  • The version of NuGet you're using
  • The package sources you're using
  • A restore log with detailed verbosity
  • MTR or a Fiddler traces (see below)
  • Your geographical area
  • Your operating system version
  • Machine configuration (CPU, Network, hard drive)
  • Whether is your machine behind a proxy or firewall
  • The versions of .NET that are installed on the machine
  • Versions of cross-platform tools such as .NET CLI, or DNU that you're using

To capture MTR:

  • Download WinMTR from
  • Enter as the hostname and click Start.
  • Wait until the Sent column is >= 100.

    Capturing MTR

  • Copy text to clipboard.

To capture Fiddler:

  • Install the latest version of Fiddler.
  • Start Fiddler and disable capturing traffic using the File > Capture Traffic menu.
  • Remove all sessions (select all items in the list, press the Delete key).
  • Configure Fiddler to capture HTTPS traffic by checking Decrypt HTTPS traffic in the HTTPS tab of the Tools > Fiddler Options... menu.
  • Close Visual Studio.
  • Enable the File > Capture Traffic menu.
  • Start Visual Studio or nuget.exe .exe and perform the actions that are not working. The traffic generated by these actions should show up in Fiddler.
  • Once the actions have run, use File > Save > All Sessions to store the captured sessions.

Note: it may be required to set the HTTP_PROXY environment variable to for routing NuGet traffic through Fiddler.

If that fails, try the tips mentioned in this StackOverflow post.