Nuget 报错:Package restore is disabled by default.解决办法

从http://www.asp.net下载一个DEMO,结果编译的时候报:

错误    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'.    HelloWebAPI

问题:是由于包含的程序包不全导致。

解决办法:VS2012-工具-选项-包管理器-程序-允许NuGet在生成期间下载缺少的程序包

这样就可以编译通过,但缺少的DLL 你还是得用NuGet重新下载下,才可以。

原文地址:https://www.cnblogs.com/flyfish2012/p/2918042.html