I right click on my solution file in my VS2010 and clicked Enable NuGet Package Restore
, and I got an error message saying Unable to read package from path 'NuGet.CommandLine.2.7.1.nupkg'.
I googled around and don't see anything close.
Any clue?
I right click on my solution file in my VS2010 and clicked Enable NuGet Package Restore
, and I got an error message saying Unable to read package from path 'NuGet.CommandLine.2.7.1.nupkg'.
I googled around and don't see anything close.
Any clue?
The error message is usually because NuGet cannot open the NuGet package because it failed to download it. I would check your NuGet cache to see if the NuGet.CommandLine.2.7.1.nupkg file is zero bytes or smaller than expected. If so delete the file or clear the cache and try again. Sometimes the download can fail and NuGet leaves an empty file in the cache which causes problems on installing that NuGet package. You can also see the error if the NuGet package did not fully download, so the package will not be zero bytes but will not have fully downloaded and NuGet cannot open it. So it is worth deleting the NuGet package from the cache and retrying.
The NuGet cache is in the following directory:
%localappdata%\NuGet\Cache
You can also browse to the NuGet cache from inside Visual Studio by opening the Package Manager Settings, selecting General and clicking the Browse button.
Note that with newer versions of NuGet 2.8 this problem should be fixed. NuGet in later versions will download to a temporary file location and renamed once the download is completed so a partially download NuGet package will not be left in the cache.
go to this location and delete the nupkg file C:\ProgramData\chocolatey\lib\openjdk11