I have nuget package restore enabled in my solution. However, when I try to build the project, I get this error:
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.
Any ideas how to fix this problem?
I have tried deleting my NuGet.targets and NuGet.exe file and re-enabling nugget package restore. It recreates the files and I get the same error.
Quick solution for Visual Studio users Select the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.
It is available in the main menu (Tools | NuGet | NuGet Force Restore) or in the NuGet quick list Alt+Shift+N .
The Add NuGet packages menu will be disabled if a project is not selected in the Solution window. Which is my guess as to why it is disabled for you. Update and Restore NuGet packages is available if a solution or project is selected.
Try and see if this helps:
in solution explorer, right click on the project name and select 'Enable Nudget package restore'
also remember to rebuild each of your projects
wait until it gets restored and run the project if it works fine
Please follow below mentioned steps:
Step 1: Please enable Nuget Package Restore by right clicking on solution [as mentioned in below screenshot]
Step 2: [Follow this if the issue / error is not resolved by following step 1] Still if you face the issue, please open .csproj file in notepad and check for the package path which might look like
So your solutions directory structure will be like: \SolutionDirectory\
Package Directory \SolutionDirectory\packages
Project Directory \SolutionDirectory\ProjectName\ProjectName.csproj
Please open this .csproj [in which you're getting error in notepad and search for packages path and update it to its relevant path.
For e.g. my .csproj contained, if .csproj file contains ....\packages then update that path with ..\packages
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