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

VS Crashes when right clicking on designer surface #35

Open
valiahmetovv opened this issue Apr 25, 2024 · 0 comments
Open

VS Crashes when right clicking on designer surface #35

valiahmetovv opened this issue Apr 25, 2024 · 0 comments

Comments

@valiahmetovv
Copy link

valiahmetovv commented Apr 25, 2024

Hi @KlausLoeffelmann

I'm trying to implement simple context menus, but any right click causes the following error:

System.InvalidOperationException
HResult=0x80131509
Message=The service 'Microsoft.DotNet.DesignTools.Client.Designers.IEventHandlerService' must be installed for this feature to work. Ensure that this service is available.
Source=Microsoft.WinForms.Utilities.Shared
StackTrace:
at System.ServiceExtensions.GetRequiredService[TService,TInterface](IServiceProvider provider)
at System.ServiceExtensions.GetCachedService[T](IServiceProvider serviceProvider, T& location)
at Microsoft.DotNet.DesignTools.Client.Designers.InputShield.OnContextMenu(Point screenLocation)
at Microsoft.DotNet.DesignTools.Client.Designers.InputShield.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at Microsoft.DotNet.DesignTools.Client.Designers.InputShield.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

RightClickError

RightClickErrorCallStack

IEventHandlerService is internal, so I'm not sure how to "install" it.

Please assist in how to resolve this error and open a simple context menu when right clicking on designer surface

Regards
Tim

cc @merriemcgaw

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