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

Integrate with the Windows 11 Context Menu #127365

Closed
xandfis opened this issue Jun 28, 2021 · 123 comments · Fixed by #151186
Closed

Integrate with the Windows 11 Context Menu #127365

xandfis opened this issue Jun 28, 2021 · 123 comments · Fixed by #151186
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders install-update VS Code installation and upgrade system issues on-testplan windows VS Code on Windows issues windows 11 VS Code on Windows 11 issues workbench-os-integration Native OS integration issues
Milestone

Comments

@xandfis
Copy link

xandfis commented Jun 28, 2021

The new Windows 11 context menu uses IExplorerCommand + app identity for app integration. Identity is established for unpackaged Win32 like VS Code using Sparse Manifests.

A sample can be found here: https://github.com/microsoft/AppModelSamples/tree/master/Samples/SparsePackages

The context menu extension is useful for a few key reasons:

  1. File Type associations don't work with extensionless files
  2. A context menu verb is the only way to open a whole folder of files in VS Code
  3. File Type Associations can be an extra set of steps when opening a file is a one-off action

image

@sbatten sbatten added install-update VS Code installation and upgrade system issues windows VS Code on Windows issues bug Issue identified by VS Code Team member as probable bug labels Jun 28, 2021
@sbatten
Copy link
Member

sbatten commented Jun 28, 2021

@joaomoreno need to test myself but this seems to be effectively a bug if this feature is broken in win11

@xandfis
Copy link
Author

xandfis commented Jun 28, 2021

@sbatten Is there a way to convert this to a bug from a feature ask, or should I file a new one?

@sbatten
Copy link
Member

sbatten commented Jun 28, 2021

I have add the bug label

@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2021

@sbatten I have talked to @xandfis over teams, feel free to ping me for more details if needed.

@joaomoreno
Copy link
Member

@joaomoreno need to test myself but this seems to be effectively a bug if this feature is broken in win11

Yup, definitely a bug on Windows if that's the case.

@Bramgus12
Copy link

Its actually still in the context menu, but you have to click on show more options. This will show the old windows 10 context menu. But I think it would still be better if it is on the first page next to windows terminal.

@sbatten
Copy link
Member

sbatten commented Jun 29, 2021

@joaomoreno i think its not necessarily a bug in Windows but a change in API if I understand OP correctly. I'll ping @isidorn for more info.

@isidorn
Copy link
Contributor

isidorn commented Jun 29, 2021

Let's first wait for this change to be done #127075
And then double check the Win11 experience after the default vscode install (associated to file types)

@dstrome
Copy link
Member

dstrome commented Jun 29, 2021

@isidorn Why does this need to be dependent on #127075? That work isn't scheduled until August and is just fit and finish. This issue is significantly impacting my work flow. It may not seem like much but I use this option with extreme frequency. Please reconsider.

@joaomoreno
Copy link
Member

significantly impacting my work flow

Nothing about Windows 11 should significantly impact anyone's workflow today. The fact that you're on Windows 11 means you enrolled in the Insider program, Dev channel. Please have patience.

@dstrome
Copy link
Member

dstrome commented Jun 30, 2021

@joaomoreno It shouldn't, but it is. I'm on dev/internal because we've been encouraged to selfhost. So do I need to choose between working and selfhosting?

@joaomoreno
Copy link
Member

Tell me why again you are forced to choose? The feature you want is there, just one additional click away. It's called a workaround, something you should expect when selfhosting on dev previews.

@JustinGrote
Copy link
Contributor

JustinGrote commented Aug 13, 2021

@dstrome if you've been encouraged to use Windows 11 by your company then your company accepts the risks of using an insider preview, this is one of them.

I'm also on Windows 11 and while I find it annoying to have to click once more, it's not really a massive, breaking change to my workflow, and I can patiently wait until this gets implemented. If it's really that big of a problem for you, you can submit a PR for it yourself :)

You can also make this registry change to re-enable the "classic" context menu
https://winaero.com/how-to-enable-full-context-menus-in-windows-11/

@siddagra
Copy link

siddagra commented Sep 7, 2021

@JustinGrote That does not work anymore

@farivarfarsian
Copy link

The new Windows 11 context menu uses IExplorerCommand + app identity for app integration. Identity is established for unpackaged Win32 like VS Code using Sparse Manifests.

A sample can be found here: https://github.com/microsoft/AppModelSamples/tree/master/Samples/SparsePackages

The context menu extension is useful for a few key reasons:

  1. File Type associations don't work with extensionless files
  2. A context menu verb is the only way to open a whole folder of files in VS Code
  3. File Type Associations can be an extra set of steps when opening a file is a one-off action

image

How We Can Get This Done ?

@siddagra
Copy link

siddagra commented Sep 23, 2021

I ended up using an ahk script as a temporary fix.
Autohotkey: https://www.autohotkey.com/

Script:

#IfWinActive ahk_class CabinetWClass
RButton::
Click, Left
Send {Shift Down}
Send {F10}
Send {Shift Up}

Image search may be a better solution though, as left and then right-clicking on a file/folder will cause you to open that file/folder with this script.

@farivarfarsian
Copy link

I ended up using an ahk script as a temporary fix.
Autohotkey: https://www.autohotkey.com/

Script:

#IfWinActive ahk_class CabinetWClass
RButton::
Click, Left
Send {Shift Down}
Send {F10}
Send {Shift Up}

Image search may be a better solution though, as left and then right-clicking on a file/folder will cause you to open that file/folder with this script.

Bro Simply Bring The Old Menu Context Back
https://gadgetstouse.com/blog/2021/07/16/get-the-old-right-click-context-menu-on-windows-11/
Why Would you use it Like That

@siddagra
Copy link

siddagra commented Sep 24, 2021

I ended up using an ahk script as a temporary fix.
Autohotkey: https://www.autohotkey.com/
Script:

#IfWinActive ahk_class CabinetWClass
RButton::
Click, Left
Send {Shift Down}
Send {F10}
Send {Shift Up}

Image search may be a better solution though, as left and then right-clicking on a file/folder will cause you to open that file/folder with this script.

Bro Simply Bring The Old Menu Context Back
https://gadgetstouse.com/blog/2021/07/16/get-the-old-right-click-context-menu-on-windows-11/
Why Would you use it Like That

I would if the solutions in the link you sent worked, but it doesn't, so I can't.

@Diegorro98
Copy link

It seems that the task for this issue has been finally completed on the Iteration Plan for September 2022!!! 🎉🎉🎉

@deepak1556
Copy link
Collaborator

Hi all, this iteration we were mostly finishing up the investigation of the last known issues with the context menu and the plan item was mostly for that. We have not merged the changes to our main branch yet, the plan is to make the feature available in Insiders for October 2022 and then based on developer feedback we will plan for adding it to stable.

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 21, 2022
@isidorn
Copy link
Contributor

isidorn commented Oct 24, 2022

We have resolved this issue and with the latest VS Code insiders this problem is now fixed. In order to have the VS Code entry in the context menu a reinstall is required so you can choose the right option in the installer.

It should be available in the December / January VS Code stable. We need this work to be in VS Code Insiders for a couple of milestones to build confidence. Thanks for understanding

Do try it out in Insiders and let us know. Thanks a lot!

@isidorn isidorn added this to the October 2022 milestone Oct 24, 2022
@Diegorro98
Copy link

I have tried downloading VS Code insiders from Microsoft Store, and the option in the contextual menu doesn't appear!
Just to make sure that everything is like it should be, I checked for updates (no new updates were available) and then I uninstalled it and installed it again but this time downloading form the web, I selected the option for the contextual menu and it worked.

Maybe the option is disabled by default and in Microsoft Store, vscode is installed with default settings. but it can't be changed later (Reinstall is required...)

@joaomoreno
Copy link
Member

Insiders

This is now available in VS Code Insiders. In order to use it, please make sure to manually reinstall
VS Code Insiders and choose the correct option in the Setup dialog.

image

Stable

This will only be available in VS Code once we're confident of the changes, no earlier than the January milestone.

@isaumya
Copy link

isaumya commented Oct 24, 2022

Hi @Diegorro98,
Yah! It's not just the insider, even the sable VS Code has the same thing. If you install it from MS Store you won't see the option for context menu addition. I have already made this mistake and then I basically uninstalled the MS Store version and downloaded from the website. Then you will see the installation guide along with all the options. So, basically don't install VS Code from MS Store.

@joaomoreno joaomoreno added feature-request Request for new features or functionality workbench-os-integration Native OS integration issues and removed bug Issue identified by VS Code Team member as probable bug labels Oct 24, 2022
@peterdickx
Copy link

Hi @Diegorro98, Yah! It's not just the insider, even the sable VS Code has the same thing. If you install it from MS Store you won't see the option for context menu addition. I have already made this mistake and then I basically uninstalled the MS Store version and downloaded from the website. Then you will see the installation guide along with all the options. So, basically don't install VS Code from MS Store.

It doesn't seem to work for directories, only for files?

@dj-fiorex
Copy link

I can confirm that this is working only for files
VsCode Insiders v.1.74

@llatpic
Copy link

llatpic commented Nov 27, 2022

I can confirm that this is working only for files VsCode Insiders v.1.74

Today it started working again on folders after some weeks. It worked before just day one on installation. ¯_(ツ)_/¯

@marawannwh
Copy link

I installed it a few days ago (not from the store), and it doesn't work with folders unless I use "show more options". Am I missing something?

@llatpic
Copy link

llatpic commented Dec 6, 2022

I can confirm that this is working only for files VsCode Insiders v.1.74

Today it started working again on folders after some weeks. It worked before just day one on installation. ¯_(ツ)_/¯

Since a couple of days ago the Insiders context menu it is gone again. I do not know why.

@edwardlee4948
Copy link

How come VsCode Insider v 1.74.0 works but VsCode Stable v 1.74.0?

@ghost
Copy link

ghost commented Dec 9, 2022

How come VsCode Insider v 1.74.0 works but VsCode Stable v 1.74.0?

#127365 (comment)

@NinelieZ
Copy link

We have resolved this issue and with the latest VS Code insiders this problem is now fixed. In order to have the VS Code entry in the context menu a reinstall is required so you can choose the right option in the installer.

It should be available in the December / January VS Code stable. We need this work to be in VS Code Insiders for a couple of milestones to build confidence. Thanks for understanding

Do try it out in Insiders and let us know. Thanks a lot!

Anyway to do this manually? (As I'm using vscode in portable mode (:з」∠) )

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders install-update VS Code installation and upgrade system issues on-testplan windows VS Code on Windows issues windows 11 VS Code on Windows 11 issues workbench-os-integration Native OS integration issues
Projects
None yet