Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2015 nuget solution is not saved how to fix it?

When using Nuget I see this error:

enter image description here

How to fix it?

like image 915
Matt black Jr. Avatar asked Jan 01 '17 10:01

Matt black Jr.


People also ask

How do I restore NuGet packages in Visual Studio 2015?

In Visual Studio on Windows, you can restore packages automatically or manually. First, configure Package Restore through Tools > Options > NuGet Package Manager.

How do I fix a missing NuGet package?

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 install NuGet packages in Visual Studio 2015?

From Visual Studio, select Tools > NuGet Package Manager > Package Manager Console. After the Package Manager Console pane opens, verify that the Default project drop-down list shows the project in which you want to install the package.

How do I reinstall NuGet package?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.


2 Answers

Just as answered by Jack, or you can close the VS directly and there will be a dialog box that let you save the .sln file, after which you can solve it.

like image 62
Vic Avatar answered Sep 23 '22 18:09

Vic


I could repro this issue if I open the project file directly without the solution file(.sln).

So just click the save button in your VS IDE, it will let you save the .sln file, and then re-install your package again.

enter image description here

like image 42
Jack Zhai-MSFT Avatar answered Sep 22 '22 18:09

Jack Zhai-MSFT