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

Click handler is never invoked in shell context menu #397

Open
nekno opened this issue Aug 19, 2023 · 0 comments
Open

Click handler is never invoked in shell context menu #397

nekno opened this issue Aug 19, 2023 · 0 comments

Comments

@nekno
Copy link

nekno commented Aug 19, 2023

Hello --- thanks for this great project.

When executing my context menu extension in the Server Manager Test Shell, my extension works as expected.

When executing my context menu extension in File Explorer in Windows 11 22H2, for some reason, the click event handler is never invoked.

Using SharpShell Easy Log, everything logs normally from the Test Shell, but in File Explorer the last line of the log is from a line in SharpContextMenu.IContextMenu.InvokeCommand():

2023-08-19 02:02:42.956Z - explorer - MyShellExtension: Invoke command index 0

I added additional logging to the top of NativeContextMenuWrapper.TryInvokeCommand() and that logging also appears when used from the Test Shell but not from File Explorer.

It's strange that execution seems to stop in IContextMenu.InvokeCommand(), but it doesn't emit the logging lines from TryInvokeCommand() or the top of my click handler for the ToolStripMenuItem.

Why would my click event handler not get executed in File Explorer?

Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant