An error occurred while trying to restore packages. Please try again
Solution 1
- Make sure you upgrade to the latest NuGet (http://docs.nuget.org/docs/start-here/installing-nuget).
- Make sure you're doing package restore "The Right Way" http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html
That should resolve the issue.
Solution 2
This is how I fix my issue:
First, I clear my Package Cache:
Second, I make sure I have the right path source and click the available package source:
Solution 3
If you don't want the package, just double-click your packages.config, find the line which refers to the package you want to get rid of, and delete that line.
Then, if you do want the package you could probably just redownload it using nuget and it'd probably resolve itself.
Solution 4
I had a similar issue with the Microsoft.Bcl.Build.1.0.14
NuGet package. My solution to this was to
- Close Visual Studio
- Remove the package folder with Explorer (or better only move it to another location)
- Start Visual Studio
- Go to the NuGet package manager and click Restore
Solution 5
I resolved the same issue by downloading the latest version of NuGet (really easy install, quick download): http://docs.nuget.org/docs/start-here/installing-nuget
user3311522
Updated on July 18, 2022Comments
-
user3311522 almost 2 years
I am trying to restore the missing nuget packages and it keeps giving me this Error:
An error occurred while trying to restore packages. Please try again.
Any experience solving this? How can I find out what exactly is causing the error?