What is NuGet?
NuGet (pronounced “New-Get”) is an open source package management system for the .NET platform. NuGet can be used to simplify the process of incorporating libraries into your project during development. NuGet is also a member of the ASP.NET Gallery in the Outercurve Foundation (see the press release).
For an introduction to NuGet, check out this video by Phil Haack.
Third Party Libraries
NuGet is extremely useful in scenarios where you want to use third party libraries, especially open source libraries. For these scenarios, you can simply use the Package Explorer to find an install the library that you need.
This makes perfect sense for third party libraries, but what about within your organization?
Chances are you have had to create a common library of sorts for one reason or another, which you then shared with multiple project teams. In order to make this library sharing consistent, perhaps you put the library on a network share that all projects pointed to, or maybe you created some sort of convention where these common libraries would be stored (solution level lib folder for example).
Then, when you want to deliver an update to this library, you had to figure out how to version the library (breaking changes vs. non-breaking changes) and communicate these changes.
The point is, this is challenging to say the least. NuGet is the answer.
So you don’t want to publish your company’s private code libraries to the public NuGet Gallery? No problem. You can create a private gallery, which can be as simple as a network share. From this gallery, you can use the power of NuGet to manage the delivery and version management of these common libraries.
For more information on creating your own private gallery, as well as the various options available, take a look at this documentation on hosting your own NuGet feeds.
Scott Hanselman’s TechEd 2011
At TechEd 2011, Scott Hanselman gave a talk on using NuGet in the Enterprise. Scott discussed NuGet, common usage scenarios, and more advanced scenarios like integration within you continuous integration process.