Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have such error in vs 2012: NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

I see that it's a bug https://nuget.codeplex.com/workitem/3780 that was fixed for version 2.8 But I can't find the 2.8 version on https://nuget.codeplex.com Is it possible to fix the error without the installation of the 2.8 version? Or how to get the 2.8?

like image 638
Midnight Guest Avatar asked Dec 31 '13 15:12

Midnight Guest


People also ask

How do I force a NuGet package to restore?

Restore NuGet packagesNavigate to Tools > Options > NuGet Package Manager > General, and then select the Allow NuGet to download missing packages check box under Package Restore. Enabling Restore NuGet Packages. In Solution Explorer, right-click the solution, and then select Restore NuGet Packages.

How do I clean my NuGet package?

Open Visual Studio, go to Tools -> NuGet Package Manager -> Package Manager Settings menu. Click Clear All NuGet Cache(s) button in options dialog then clearing process is started. Once NuGet cache location is cleared, click ok button.

How do I restore NuGet packages in Visual Studio 2013?

In Visual Studio, click Project > Enable NuGet Package Restore > answer Yes in the dialog. Right-click on the gplus-quickstart-csharp project and select Manage NuGet Packages. Click Restore on the Manage NuGet Packages window. This will install the Google API Client libraries.

How do I install a NuGet package in powershell?

NuGet supports Install−Package, Update−Package, Find-Package, and Get−Package command and if Nuget package is not installed in your system, you may not find a package or install any package. For more reference about Nuget, check the websites below. To install NuGet, we need to use the Install−PackageProvider command.


3 Answers

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!)

like image 64
st78 Avatar answered Oct 24 '22 02:10

st78


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.

like image 27
Noctis Avatar answered Oct 24 '22 04:10

Noctis


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.

like image 15
InquisitorJax Avatar answered Oct 24 '22 02:10

InquisitorJax