An error occurred while trying to restore packages. Please try again

104,810

Solution 1

  1. Make sure you upgrade to the latest NuGet (http://docs.nuget.org/docs/start-here/installing-nuget).
  2. 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:

enter image description here

Second, I make sure I have the right path source and click the available package source:

enter image description here

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

  1. Close Visual Studio
  2. Remove the package folder with Explorer (or better only move it to another location)
  3. Start Visual Studio
  4. 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

Share:
104,810
user3311522
Author by

user3311522

Updated on July 18, 2022

Comments

  • user3311522
    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?