简体   繁体   中英

Cannot create window when opening VS2022 Preview (devenv crashes)

I've been trying to work on MAUI.Net and have been playing with VS2022 community preview (currently 17.3.0 Preview 1.1). I had it running side-by-side happily with VS2022 community (non-preview) but couldn't get MAUI.Net working. After following advice from some posts to try to get Maui working, VS2022 (preview or std) now fails to load.

Firstly, I get an error "the global hub client package did not load correctly" - it offers the option to suppress the message, and it doesn't look fatal. Then I simply get an OK-only message box: "Cannot create the window": clicking OK closes the box and VS2022 doesn't open. I've tried answers from "Cannot create the window" with visual studio 2013 and I've tried devenv /clearcache & devenv /updateconfiguration . I've also tried safe mode. No dice.

I've uninstalled all VS versions, including uninstalling almost all my framework SDKs, then reinstalled, and I still get the same results.

Can anyone point me a to a likely cause, or even a log location where I might get more detail?

Basic info: VS2022 17.3.0 preview 1.1 on Win10, 16Gb RAM (45% used, so plenty free), 25+Gb disk space free after install

This issue is caused by having the file "Microsoft.VisualStudio.Shell.15.0.dll" registered in the GAC (Global Assembly Cache).

The fix is to simply remove it from the GAC.

The following info is from the developercommunity.visualstudio.com thread regarding this issue and the solution to correct it.

https://developercommunity.visualstudio.com/t/Cannot-create-the-window---VS-2022-172/10040806?space=8&q=2022+cannot+create+the+window

To verify your machine is impacted

  1. Open a Developer Command Prompt for Visual Studio
  2. Run gacutil /l "Microsoft.VisualStudio.Shell.15.0" and observe the output. If you have any entries here, you are affected.

To repair your machine

The recommended fix is to remove this assembly from the GAC. Note this may negatively impact whatever software put it there.

To un-GAC the dll you need to launch an admin developer command prompt and enter the following command:

gacutil /u Microsoft.VisualStudio.Shell.15.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM