I have VS2017 and VS2019 on my machine. I have a lot of nuget references that are missing (yellow icon) in VS2019 Solution Explorer. I've tried doing a Restore Nuget Packages and I see:
All packages are already installed and there is nothing to restore.
Time Elapsed: 00:00:00.0560466
========== Finished ==========
I went into the Package Manager Console and tried to do a:
nuget restore MySolution.sln
and get a
nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
I looked around on my hard drive and only see nuget.exe existing in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\SqlChangeAutomation\OctoPack\build\NuGet.exe
Why doesn't it also exist under 2019?
Thanks
you can download the Nuget.exe from here.
Copy the Nuget.exe somewhere where you keep your tools. Then I recommend entering the location where you saved the Nuget.exe in the PATH system variable.
I would try to clear the nuget cache. You do this with the following command:
nuget locals all -clear
This ensures that all packages are downloaded again.
You cannot call Nuget.exe in the Package Manager Console. To do this, you have to open a console session and change to your solution directory to execute the desired command.
nuget restore MySolution.sln
Above all, it is also very helpful if you browse the Nuget documentation pages a little. You can find them here.
I hope I could help you a little with it and guide you on a possible path.
Best wishes
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