Visual Studio 2012 and NuGet packages

Last year I wrote about installing missing NuGet packages and Visual Studio projects. That works well but it does require using a command line version of NuGet.

It turns out that this has become a lot easier in VS2012 and is supported natively from within Visual Studio.

Enabling support

The first step is to enable the feature as it is disabled by default. This setting lives under Options -> Package Manager -> General.



Restoring missing packages from a VS2012 solution

Assuming you have to restore missing packages for a solution the first thing is to enable this on the project. Right click the solution file and select Enable NuGet Package Restore.


Next open the package manager console. There should be a button to restore missing packages. Click this and all missing packages are loaded and the project compiles again.

Package Manager Console


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s