Skip to main content

NuGet Hosted Repositories in Nexus Repository 2

Nexus Repository 2

A hosted repository for NuGet can be used to upload your own packages as well as third-party packages. It is good practice to create two separate hosted repositories for these purposes. To create a NuGet hosted repository, simply create a new Hosted Repository and set the Provider to NuGet. A sample configuration for an internal releases NuGet hosted repository is displayed in Figure 15.3, “Example Configuration for a NuGet Hosted Repository for Release Packages”.

5410950.png

Figure 15.3. Example Configuration for a NuGet Hosted Repository for Release Packages

Besides the NuGet tab, the configuration for the repository has a NuPkg Upload tab as displayed in Figure 15.4, “The NuPkg Upload Panel for a Hosted NuGet Repository” that allows you to manually upload one or multiple packages.

5410949.png

Figure 15.4. The NuPkg Upload Panel for a Hosted NuGet Repository

The NuGet feed is immediately updated as packages are deployed or deleted from the host repository. To rebuild the feed for a hosted NuGet repository you can manually schedule a Rebuild NuGet Feed task.