-
Go to the packages folder in the Windows Explorer and delete it.
-
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.
-
Clean the solution
-
Then right click the solution in the Solution Explorer and enable NuGet Package Restore
-
Build the solution
For Visual Studio 2013 and above, step 2) should read:
-
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.