O'Reilly logo

Professional ASP.NET MVC 4 by Scott Hanselman, K. Scott Allen, Brad Wilson, Phil Haack, Jon Galloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Publishing Packages

The previous section looked at how to create packages. Creating packages is useful, but at some point, you may to want to share them with the world. If you don't care to share them, you can still make use of NuGet with private feeds. I cover that later.

Publishing to NuGet.org

By default, NuGet points to a feed located at https://nuget.org/api/v2/.

To publish your package to this feed, you do the following:

1. Set up a NuGet Gallery account at http://nuget.org/. Figure 10.20 shows the NuGet gallery.
2. Log into the site, and then click your username. This brings you to a page with options to manage your account and your packages. Click on the Upload Package link to navigate to the upload page, as shown in Figure 10.21.

Uploading a package takes you to a screen that enables you to verify the metadata for the package, as shown in Figure 10.22. If you want to upload the package but keep it hidden from search results, uncheck the “List this package in search results” option. Note, the package can still be installed if you know the ID and version. This is useful if you want to test the package before you list it publicly.

3. Once you've verified the metadata, click Submit. This uploads the package and redirects you to the package details page.

Using NuGet.exe

Given that you can use NuGet.exe to create a package, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required