Using NuGet in VS2010

NuGet is a great tool for maintaining packages and references to external frameworks!
But I had some trouble with it on the last few projects to get it 'right'.
When a new team-member was  (or a new machine) added to the project, I had some trouble getting NuGet to resolve the packages so it would be right after the first 'Get Latest'.

I tried several solutions like adding the nuget.exe to the project and calling it from pre-build events, but this didn't feel right.

After some searching I found a solution which works for me.
Apparently when you download and install NuGet yourself you get better options and extensions in VS2010.

To this you need to download the .vsix from nuget.codeplex.com.
When you are using VS2010 under Windows XP (like I do for some projects) you probably want to install PowerShell 2.0 as well, because some installers like EntityFramework use it to install the package.

For XP download Powershell 2.0 from http://www.microsoft.com/en-us/download/details.aspx?id=16818))

Now go to the settings of NuGet Package Manager and under General check the 'Allow NuGet to download missing packages during build'.

And presto! You're all setup.

Ronald Harmsen

I'm a software developer. When I'm not developing software I'm training & coaching other developers, speaking on a conference or fiddling with some technical stuff.

Arnhem, The Netherlands

Subscribe to Ronald to the cloud

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!