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

扶醉桌前 提交于 2021-02-04 14:02:20

问题


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


回答1:


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




回答2:


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.




回答3:


-First Delete all cache on C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

-Second Reinstall Nuget package manager by Tools->Extensions and Updates. After that restart your visual studio

-Third Go to Tools->Nuget Package Manager->Package Manager Settings of blank project (for create new cache), and after that, try on your project




回答4:


I was getting this with a Visual Studio Extension from Telerik. Once I uninstalled it went away.




回答5:


In VisualStudio 2015 -> Tools -> Extensions and updates -> Online: Search for the string: "Fix NuGet GetFullVsVersionString must be called on the UI thread" and install the given fix.

Alternatively you can download the fix at : GetFullVsVersionString fix

Now in February 2018, the latest NuGet Package Manager version 3.4.4.1321 does not have the fix included, so the patch must be applied.

As Steve Greene's answer describes, I also had the Telerik extension installed, so that might have caused the problem.




回答6:


This problem can happen if you have Xamarin for Visual Studio installed. There is a NuGet bug reported about this.

If you have Xamarin component in one of your projects and then try to use NuGet then NuGet can be called on the wrong thread.

There is a separate Xamarin extension that can be installed to fix this problem with Xamarin for Visual Studio.




回答7:


Run the Visual Studio as 'Run as administrator' mode.

If it does not work then, if you have other version of Visual Studio like 2013 then uninstall all and install again.




回答8:


This is what worked for me (VisualStudio 2015):

  • Uninstalling NuGetPackageManager in Tools->Extensions and Updates.
  • Closing all open VisualStudio.
  • Deleting the cache on C:\Users\user\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
  • Restart PC
  • Install NuGetPackageManager in Tools->Extensions and Updates in a blank application or on the startup VisualStudio screen.
  • Close every VisualStudio again.
  • Finally it should work.

I had to follow this process or it did not work.



来源:https://stackoverflow.com/questions/39678601/visual-studio-2015-initializing-part-nuget-packagemanagement-visualstudio-vsolut

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!