Nuget - Don't see allow nuget to download missing packages during build

Nate Pet picture Nate Pet · Jun 29, 2012 · Viewed 45.7k times · Source

I get a message saying the following:

Error 1 Package restore is disabled by default. To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'.

When I go to Tools -> Options, I do not see Package Manager and underneath I see Package Sources and Recent Packages. I do not see anywhere where I can set Allow Nuget to download missing packages during build though.

Answer

Alexandre Dion picture Alexandre Dion · Jun 29, 2012

The option to give consent in the UI has been added with NuGet Package Manager 1.8. It's the 3rd item under Tools-> Options-> Package Manager-> General : "Package Restore : Allow NuGet to download missing packages during build".

Please make sure NuGet is up-to-date in Tools->Extension Manager.

Alternatively you can give consent by setting the EnableNuGetPackageRestore Environment variable to true.