I go to Tools -> Options -> Package Manager -> Allow Nuget... to have the option enabled already. I opened Package Manager Console and typed install-package MyPackageName
to install NuGet package successfully, and package folder was created fine. I am pretty sure I have latest version of NuGet installed already.
I closed solution and my VS2010, I deleted package folder, reopen the solution in VS2010, but it does not download any packages at all.
I think I should see a .nuget folder in solution, but it is not there.
Any clue?
Enable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages.
Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.
Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.
You need to enable NuGet package restore on your solution.
In the Solution Explorer, right-click on your solution and click 'Enable NuGet Package Restore'. This is what will created the .nuget
directory and add the nuget targets that will drive the package restoration process.
See the official documentation for a walkthrough.
Edit: This answer might be somewhat obsolete. MSBuild-Integrated Package Restore is no longer the suggested package restoration option - have a look at either Automatic Package Restore or Command-Line Package Restore on the official NuGet package restoration documentation. Having said that, MSBuild-Integrated package restore still works, and is still supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With