microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.22k stars 28.3k forks source link

Uninstalling VS Code takes a long time, when enabling the Windows 11 context menu action #164689

Open dbaeumer opened 1 year ago

dbaeumer commented 1 year ago

Testing #164465

When uninstalling VS Code with enabled Open menu entry the uninstaller seems to hang at the beginning and it takes quite some time until it finishes. I never experienced this when testing the final Windows bits during endgame.

deepak1556 commented 1 year ago

We now run a powershell command during uninstall to remove the appx package and this can take longer if file explorer is actively holding reference to the COM object. I don't have ideas now to make this better since this flow happens outside the application and not much we can intervene in this flow.

joaomoreno commented 1 year ago

How long approximately?

joaomoreno commented 1 year ago

@dbaeumer Is this still an issue?

dbaeumer commented 1 year ago

Yes, still repros for me.

Henning742 commented 10 months ago

Would running that PS command only after the next OS restart help?

deepak1556 commented 6 months ago

I was unable to repro with latest insiders but not sure if it has to do with canary channel of windows I am using, @dbaeumer can you help confirm if this is still an issue. Thanks!

dbaeumer commented 6 months ago

I can still reproduce the hang in a Windows Sandbox.

deepak1556 commented 6 months ago

@dbaeumer thanks for confirming, what is the build version of your OS ?

dbaeumer commented 6 months ago
image
deepak1556 commented 5 months ago

@dbaeumer can you capture a profile following the steps below, it would help moving this issue forward https://github.com/microsoft/vscode/issues/204696

reves commented 5 months ago

@deepak1556 I checked out the #187015 that tried to fix this issue, and your comment that justifies the use of double {{.

So that's why i'm interested if the ScriptBlock on this line shouldn't end with double }} as well? Like this: {{Remove-AppxPackage -Package ""{#AppxPackageFullname}""}}

No idea if it's important, i just hope it helps.

dbaeumer commented 5 months ago

Tried to install the profile and get this:

image
dbaeumer commented 5 months ago

Any tips?

deepak1556 commented 5 months ago

Sorry, try with this new profile CloudFileExplorerLogs.zip

If import was successful, you should see the following entry Screenshot 2024-02-09 181900

dbaeumer commented 5 months ago

@deepak1556 still the same problem with the new profile

cast

deepak1556 commented 5 months ago

Thanks for trying it out, I have reached out to the file explorer team, will follow up.

kybarg commented 5 months ago

Can anyone else reproduce and confirm this issue? Maybe this is single system issue Can't reproduce on my system

Edition     Windows 11 Pro
Version     23H2
Installed on    ‎05.‎08.‎2023
OS Build    22631.3155
Experience  Windows Feature Experience Pack 1000.22684.1000.0
Vaibhav-Naik-26 commented 5 months ago

This feature is not been added because

When uninstalling VS Code with enabled Open menu entry the uninstaller seems to hang at the beginning and it takes quite some time until it finishes. I never experienced this when testing the final Windows bits during endgame.

So, I request the developers to let users decide whether they want the option to add Visual Studio Code to the Windows 11 Primary/Main Context Menu during installation. Users should be able to check a box if they want this feature, with the box being unchecked by default. Provide an option here

maisondasilva commented 3 months ago

I was unable to reproduce in Beta, Dev and Canary and also in Sandbox.

albertvaka commented 1 month ago

Should this be a blocker? The lack of an entry in the context menu affects way more users than this potential issue.

EuDs63 commented 1 month ago

Should this be a blocker? The lack of an entry in the context menu affects way more users than this potential issue.

I couldn't agree more! For me, I will probably never uninstall it once I have downloaded it. However, I need this feature to save time.