-1

While attempting to build or open a project in Visual Studio 2015 14.0.25431.01 Update 3 which I recently installed, I keep getting errors around nuget package management. Whenever I build the project the first time after opening VS, I get the error message below. I also get it when I try to open the nuget package manager dialog. Anyone else experience this?

An exception was thrown while initializing part "Nuget.PackageManagement.VisualStudio.VSolutionManager". GetFullVsVersionString must be called on the UI thread.

Error 1

Error 1


Related Thread :

Visual Studio 2015 Initializing Part Nuget.PackageManagement.VisualStudio.VSolutionManager must be called on UI Thread
Solution :

It appears reinstalling Nuget Package Manager for Visual Studio in the Extensions & Tools dialog may have fixed it.

I did this solution - But problem exist still!!!!!!

SilverLight
  • 19,668
  • 65
  • 192
  • 300
  • When i open VS solution from project's sln file directly error appears. But when i open new visual studio & open nuget settings & open project from Open Project menu error vanished. What is going on? – SilverLight Nov 15 '20 at 17:49
  • What is your project type? Does this issue still happen in a new project? – Mr Qian Nov 16 '20 at 09:52
  • ASP.Net Web Application. No - Not happen in a new project. I have many created projects. All of them were ok - but suddenly that error appeared. – SilverLight Nov 16 '20 at 10:56

1 Answers1

0

Actually, this issue might be caused by other third party extensions, components caches, nuget caches or VS environment, I suggest you could try the following suggestions:

Suggestions

1) disable any third party installed extensions exclude under Tools-->Extensions and Updates except NuGet Package Manager for Visual Studio 2015.

Then, uninstall NuGet Package Manager for Visual Studio 2015 extension.

2) close VS,

a) delete all nuget caches under C:\Users\xxx(current user)\.nuget\packages and also delete the nuget.config under C:\Users\xxx(current user)\AppData\Roaming\NuGet`

Besides, delete .vs hidden folder under the solution folder, bin and obj folder of the project folder.

b) delete all component caches under

C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

c) then restart VS and then install nuget extension directly from this VS marketplace website.

3) try to run devenv /safemode under Developer Command Prompt for VS2015 to start VS and then test again. This mode is a pure, initial vs environment when you first installed.

4) repair VS from the Control Panel-->Programs-->right click on VS2015-->Change-->Repair

Mr Qian
  • 21,064
  • 1
  • 31
  • 41