Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 menu recommendation #183297

Open
Jennifer-Watkins opened this issue May 24, 2023 · 34 comments
Open

Windows 11 menu recommendation #183297

Jennifer-Watkins opened this issue May 24, 2023 · 34 comments
Assignees
Labels
system-context-menu Issue related to context menu drawn by the OS under-discussion Issue is under discussion for relevance, priority, approach windows 11 VS Code on Windows 11 issues workbench-os-integration Native OS integration issues

Comments

@Jennifer-Watkins
Copy link

Jennifer-Watkins commented May 24, 2023

Type: Feature Request

It is hoped that when you check (right-click the folder to open vscode) during installation, you can display [Open in vscode] directly in the right-click of windows11, instead of holding down [shift+ right-click] to display [Open in vscode].

VS Code version: Code 1.78.2 (b3e4e68, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

@deepak1556
Copy link
Contributor

The feature is available with insiders https://code.visualstudio.com/insiders since #127365, I don't have plans to push this feature to stable since #164689 is a blocker.

@deepak1556 deepak1556 added under-discussion Issue is under discussion for relevance, priority, approach windows 11 VS Code on Windows 11 issues labels Jun 1, 2023
@phuze
Copy link

phuze commented Jun 1, 2023

@deepak1556, issue #164689 describes a scenario where the tester, @dbaeumer, reported that VS Code took "quite some time" to uninstall.

I don't understand why we're holding a critical productivity feature, because a single user reported that the application uninstalled slowly? Forgive me, but that seems highly subjective.

@dbaeumer didn't identify how long it took to uninstall, or otherwise provided any information pertaining to the scenario under which this uninstallation was slow. To that extent, by what or whose standard, was this uninstall deemed slow?

I've personally just uninstalled VS Code Insiders, and the uninstall didn't hang, and was nearly instantaneous.

Ultimately, @dbaeumer didn't report that the uninstall failed --- so why are we considering this a blocker? Keep in mind, we're talking about uninstalling the application. This is not something that impacts in-app performance, application or file load times, or frankly anything of significance to the end-user.

Even still, you suggested that this could be related to some scenario where windows file explorer is holding some kind of object reference. Why not just prompt the user to restart and execute your powershell script when Windows boots up?

Please @deepak1556, it's been what --- nearly 2 years now that the community has been asking for this functionality. Please reconsider your position on this matter?

@Chigusa0w0
Copy link
Contributor

Chigusa0w0 commented Jun 16, 2023

For anyone here seeking a manual way to enable the context menu support before VSCode officially supports the feature in stable release:

Disclaimer: These steps are unofficial and are not supported in any form by Microsoft or the VSCode developers. While the following guide has been tested by and has worked for me, I cannot guarantee that it will work for you as well. I am also not responsible for any damage it may cause.

  1. Get the latest release of VSCode context menu extension from https://github.com/microsoft/vscode-explorer-command/releases/

    At the time of writing, the latest version is 3.0.4

    Please make sure you have downloaded the correct file (code_explorer_<arch>.zip)

  2. Unzip the downloaded zip to <vscode_install_path>/shell/

    The folder is not a part of a standard VSCode installation, so you need to manually create it

    For me, the installation path of VSCode is C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\.

  3. Unpack the <vscode_install_path>/shell/code_explorer_x64.appx file, extract all three .xml into the same folder

    You can open it as an archive, when using 7-Zip

    You may try other archivers, but .appx has a slightly different binary format than standard zip file, so good luck

  4. Your file tree should now look this:

<vscode_install_path>
|-bin/
|-...
|-shell/
| |-[Content_Types].xml
| |-AppxBlockMap.xml
| |-AppxManifest.xml
| |-code_explorer_command.dll
| L-code_explorer_x64.appx
|-...
|-Code.exe
L-...
  1. Open <vscode_install_path>/shell/AppxManifest.xml with a text editor, find and edit this line:
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"

Replace the two Microsoft Corporation with anything you like.

This is because Windows will prevent you from installing unsigned app published by Microsoft.

  1. Open Registry Editor (regedit.exe), under HKEY_CURRENT_USER\Software\Classes, create a key called VSCodeContextMenu

    You may create the key under HKEY_LOCAL_MACHINE\Software\Classes instead, if you want to enable the context menu extension for other users as well

  2. Under the newly created HKEY_CURRENT_USER\Software\Classes\VSCodeContextMenu, create a String Value. The Value name is Title. The Value data is Open with VSCode.

  3. Enable Developer Mode from your windows setting (Settings > Privacy & security > For developers > Developer Mode)

    So that we can install app from loose file.

  4. Open a PowerShell window with admin privilege, go to <vscode_install_path>/shell/, run the following command and wait for it to complete

Add-AppxPackage -Path "<vscode_install_path>/shell/AppxManifest.xml" -Register -ExternalLocation "<vscode_install_path>/shell/"
  1. You can turn off Developer Mode now.

  2. Restart File Explorer (explorer.exe) with Task Manager. Done.

PS. To remove the installed context menu extension, run this PowerShell command in a privileged PS window to get the PackageFullName of the extension

Get-AppxPackage Microsoft.VSCode

Then run this command to remove the extension

Remove-AppxPackage <your_PackageFullName_obtained>

The Remove-AppxPackage command takes about a minute to finish (for me). You should restart File Explorer, remove the registry key and delete the <vscode_install_path>/shell/ folder after the command completes.

@deepak1556 deepak1556 added workbench-os-integration Native OS integration issues system-context-menu Issue related to context menu drawn by the OS labels Jun 19, 2023
@deepak1556
Copy link
Contributor

@phuze I went through the issue tracker again and we still have open issues related to this feature in different scenarios. I am also out of ideas for debugging these issues and happy to receive help from the community in addressing them. The feature in its current state is not stable ready.

@carlosrmendes
Copy link

Unbelievable how this is still not resolved... Is it really that hard for an app from Microsoft itself to fix an issue for a feature where many other applications from other vendors can do it easily?

It's really frustrating having to open VSCode first in order to then open any folder, instead of opening the folder directly in VSCode from the Explorer.

@Xavinooo
Copy link

I'm done waiting, I completly ditched the win11 contextual menu for https://github.com/moudey/Shell, which is 10x better than the win11 one.
The configuration is not that easy, but once done, it's great. Event did it on some win10 machines.

@tompetk
Copy link

tompetk commented Jan 28, 2024

Any ETA for stable build on this one guys?

@reves
Copy link

reves commented Feb 3, 2024

@deepak1556, I propose to add this feature and make it optional & disabled by default, as a compromise to the current situation.

@gjsjohnmurray
Copy link
Contributor

@ArchemedIan please see #204696 which is referenced on the current iteration plan.

@xylplm
Copy link

xylplm commented Mar 19, 2024

Why does Microsoft's own operating system not receive support for Microsoft's own projects? A right-click menu should not be difficult for Microsoft developers, right.

@twolivier
Copy link

How on earth is this still missing from VS Code? Did Microsoft make the Windows 11 context menu so bad that not even other teams within the company can work with it?

@romulof
Copy link

romulof commented Mar 27, 2024

Why are you hoping for a Microsoft product to integrate with another MS product?

@microsoft microsoft locked as spam and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
system-context-menu Issue related to context menu drawn by the OS under-discussion Issue is under discussion for relevance, priority, approach windows 11 VS Code on Windows 11 issues workbench-os-integration Native OS integration issues
Projects
None yet
Development

No branches or pull requests

16 participants