Can't restore NuGet Packages in Visual Studio


NuGet is free, open-source package management system designed by .NET Team for the Microsoft development platform to ease the task of integrating any 3rd party open source components in the project. NuGet has changed into a very big ecosystem of tools and services after it was introduced in 2010. NuGet is most commonly distributed as an extension in Visual Studio.

This article shows you how to restore NuGet Packages if you are facing some issues:

Solution 1

First enable package restore as mentioned below:

  1. Click Tools -> NuGet Package Manager -> then select Package Manager Settings.
  2. Package Manager Settings
  3. Under Package Restore, select both options
  4. Click OK
  5. Build your project

Solution 2

Try updating your Visual Studio to the lastest version, sometimes the updates helps you solve package issues which was previously not supported.

Solution 3

Right-click on the Solution and click "Restore NuGet Packages" option. Or you can try executing this console command in the folder that has your solution file:

dotnet restore

nuget restore
Update-Package �reinstall <packageName>

Solution 4

Try removing all the nuget packages. To do that, select NuGet and then right click to remove it, then go to the app package and remove the Packages Folder. After doing this just restart your visual studio (VS) and reinstall the Nuget Packages again.

If any of the solutions doesn't work for you, and you have found a solution yourself please post it in our Comments Section.

Solution Worked 4 UpvotesUpvote


Solution Didn't Worked 1 DownvotesDownvote


Get Programming Help

Play 2048 Game Online

Search Tags