Bewerken

Delen via


Hosting your own NuGet feeds

Instead of making packages publicly available, you might want to release packages to only a limited audience, such as your organization or workgroup. In addition, some companies may want to restrict which third-party libraries their developers may use, and thus direct those developers to draw from a limited package source rather than nuget.org.

For all such purposes, NuGet supports setting up private package sources in the following ways:

  • Local feed: Packages are simply placed on a suitable network file share, ideally using nuget init and nuget add to create a hierarchical folder structure (NuGet 3.3+). For details, see Local Feeds.
  • NuGet.Server: Packages are made available through a local HTTP server. For details, see NuGet.Server.
  • NuGet Gallery: Packages are hosted on an Internet server using the NuGet Gallery Project (github.com). NuGet Gallery provides user management and features such as an extensive web UI that allows searching and exploring packages from within the browser, similar to nuget.org.

There are also several other NuGet hosting products such as Azure Artifacts and GitHub package registry that support remote private feeds. Below is a list of such products:

Regardless of how packages are hosted, you access them by adding them to the list of available sources in NuGet.Config. This can be done in Visual Studio as described in Package Sources, or from the command line using nuget sources. The path to a source can be a local folder pathname, a network name, or a URL.