Introduction to NuGet

Try as it might, it's impossible for Microsoft to provide every possible piece of code a developer could need. There are millions of developers on the .NET platform, each with unique technical and business problems to solve. Waiting on Microsoft to solve every problem just doesn't scale, nor make sense.

The good news is that many of these developers are “scratching their own itch” by writing useful libraries that solve their own problems and the problems of their peers. They're also distributing these libraries on the Web, often as a free download or under an open source license.

With all these useful libraries out there in the wild, the challenge becomes finding one of the libraries and making proper use of it in your project, not to mention tracking updates for all the libraries you've incorporated.

This section walks through a quick example of the steps it took before NuGet to grab the ELMAH library. ELMAH stands for Error Logging Module and Handler and is a very useful library for logging and displaying unhandled exception information within a web application.

These are the steps it takes to make use of it:

1. You have to find ELMAH. Due to its unique name, this is easy with any search engine.

2. Download the correct zip package. Multiple zip files are presented, and as I personally learned, choosing the correct one isn't always trivial.

3. “Unblock” the package. Files downloaded from the Web are marked with information specifying that they came from ...

Get Professional ASP.NET MVC 3 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.