1. Go to the packages folder in the Windows Explorer and delete it.
  2. Open Visual Studio and Go to Tools > Library Package Manager > Package Manager Settingsand under the Package Manager item on the left hand side there is a "Clear Package Cache" button. Click this button and make sure that the check box for "Allow NuGet to download missing packages during build" is checked.
  3. Clean the solution
  4. Then right click the solution in the Solution Explorer and enable NuGet Package Restore
  5. Build the solution

 

For Visual Studio 2013 and above, step 2) should read:

  1. Open Visual Studio and go to Tools > Options > NuGet Package Manager and on the right hand side there is a "Clear Package Cache button". Click this button and make sure that the check boxes for "Allow NuGet to download missing packages" and "Automatically check for missing packages during build in Visual Studio" are checked.

 

posted on 2016-06-16 16:42  今夜太冷  阅读(431)  评论(0编辑  收藏  举报