NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

Solution 1:

I fixed this by deleting the visual studio solution user options file (.suo) and then restarting VS.

UPDATE: For VS 2017, you need to delete a hidden folder named .vs located in solution directory (Thanks @Tien Dinh!)

Solution 2:

Had the same issue with VS2013 today. After running an update on installed packages (tools -> extensions and updates) (which included nuget), and installing some updates for VS2013 (windows update had some), it has gone away.

So basically, check for those updates, update, and it might solve the issue.

Solution 3:

I have VS 2013. According to the extensions manager, nuget was up to date.

Ran a manual install from the vsix site: http://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca

... fixed the issue.

Solution 4:

A simple restart of Visual Studio should clear everything up. I had the same issue in VS2013 after upgrading Web API. It was not necessary to delete the .suo.

Solution 5:

I right clicked the solution and chose "Enable Nuget Package Restore". This fixed the problem.

This link from MSDN shows how:

http://blogs.msdn.com/b/dotnet/archive/2013/06/12/nuget-package-restore-issues.aspx

nuget visual-studio