Tuesday, August 7, 2012

Getting Started with NuGet

If you haven't heard about NuGet you are missing a lot of fun and a good productivity boost. NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries and tools, that you can use in your projects when working with Visual Studio.

You can easily install it from their website. Alternatively, just click this link to download the installer. The new version, 2.0, was just released, and there are new goodies to take advantage of. The installation is straight forward and it will install the package manager extension on all the Visual Studio versions you have on your machine.

The beauty of NuGet is that it allows you to easily find and install popular, industry proven third party libraries and tools, but also publish your own packages to share with others. This is probably the best way to expose your own libraries and tools to other developers in a save and easy way.

To install a package, simply right click on your project references solution folder, and click on "Manage NuGet Packages".

The NuGet dialog will open and you will be able to browse and search packages, and apply handy filters to narrow down your search. Once you find the package you want, just click the install button and NuGet will take care of the rest.

Once the package is installed, you will see a green check mark next to it, and once you close the dialog, you will see the corresponding references and files added to your project, plus a "packages.config" file with the settings for the isntalled package.

That's it, you can just use the library you just installed right away.

Here is an overview of NuGet functionality, and here is more about the different ways to install and configure packages. Make sure to check the rest of the documentation to make the most out of it.

Hope it helps!

No comments:

Post a Comment