Skip to content

MenuStrip "broken" #12091

@RandyPJ

Description

@RandyPJ

Environment

Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.11.2

.NET version

.NET 8

Did this work in a previous version of Visual Studio and/or previous .NET release?

Yes.

Issue description

MenuStrip broken in designer when i click on a ToolStripMenuItem.
image

Steps to reproduce

The steps:
1 - Create a .net 8 Winforms app.
2 - Add MenuStrip to a Window.
3 - Add some ToolStripMenuItems and try to add childrens and siblings.

Diagnostics

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: Failed to set Win32 parent window of the Control.
   at Microsoft.DotNet.DesignTools.Client.DesignToolsClient.<SendRequestAsync>d__49`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
   at Microsoft.DotNet.DesignTools.Protocol.Endpoints.Input.InputMessageEndpoint.Sender.SendRequest(SessionId sessionId, UInt32 messageType, UIntPtr wParam, IntPtr lParam, Point location, Keys modifierKeys, IntPtr controlHandle, Nullable`1 toolboxItemSelected)
   at Microsoft.DotNet.DesignTools.Protocol.Endpoints.DesignToolsEndpoints.InputImpl.InputMessage(SessionId sessionId, UInt32 messageType, UIntPtr wParam, IntPtr lParam, Point location, Keys modifierKeys, IntPtr controlHandle, Nullable`1 toolboxItemSelected)
   at Microsoft.DotNet.DesignTools.Client.Designers.InputShield.ProcessMessage(WindowMessage message, Point screenLocation, UIntPtr wParam, IntPtr lParam, Boolean isHookMessage)
   at Microsoft.DotNet.DesignTools.Client.Designers.InputShield.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions