Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

While attempting to build or open a project in Visual Studio 2015 14.0.25431.01 Update 3 which I recently updated, 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.

1

like image 432
Adam Avatar asked Nov 30 '22 09:11

Adam


2 Answers

I had the exact same issue as you and I was able to get NuGet to work again for me by doing the following simple steps.

  1. Completely close all versions and windows of Visual Studio
  2. Reopen a blank Visual Studio window
  3. Navigate to Tools -> NuGet Package Manager -> Package Manager Settings
  4. Press "OK"
  5. Open the project you were having issues with
  6. Try opening "Manage NuGet Packages..." or running your project

Your issue should now be fixed!

I had originally tried uninstalling NuGet and reinstalling it through the "Extensions and Updates" under "Tools" to no avail. The solution I listed above fixed it instantly.

like image 155
Jolley71717 Avatar answered Dec 09 '22 09:12

Jolley71717


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

like image 40
Adam Avatar answered Dec 09 '22 09:12

Adam