NuGet Proxy Repositories

The NuGet Gallery is the common repository used by all package authors and consumers. To reduce duplicate downloads and improve download speeds for your developers and CI servers, you should proxy the NuGet Gallery with the repository manager. If you use other external repositories, you should also proxy these. A default installation of the repository manager has the NuGet gallery set up as a proxy repository with the name nuget.org-proxy.

To proxy another external NuGet repository, you simply create a new nuget (proxy) as documented in Repository Management. The Remote Storage has to be set to the URL of the remote repository you want to proxy. The default configuration for proxying the NuGet Gallery is partially visible in Figure 9.1, “NuGet Proxy Repository Configuration for the NuGet Gallery” and uses the URL of the API https://www.nuget.org/api/v2/.

Figure 9.1. NuGet Proxy Repository Configuration for the NuGet Gallery

By default, searches in NuGet proxy repositories in the repository manager initiated by a client like nuget or VisualStudio will be passed through to the remote repositories. The search results are merged with internal search results and included in an internally managed index. This merging has to make some assumptions to generate component counts. These counts should therefore be considered approximate numbers. The cache can be configured in the NuGet section documented in NuGet Repository Format.