Could not determine a valid designer type for 'RootNamespaceName CustomToolStripDesigner,
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
> @Shyam-Gupta
>
> Additional information
>
> We are encountering a designer load failure when using a custom ToolStripEx control in a .NET Core WinForms project. The error is displayed in the Output window under the "WindowsForms" pane as shown below:
>
>
> [17:01:44.584149] fail: Could not determine a valid designer type for '"RootNamespaceName".CustomToolStripDesigner, "AssemblyName"'.
> For information on how to troubleshoot the designer refer to the guide at https://aka.ms/winforms/designer/troubleshooting
>
> This issue occurs when adding our custom ToolStripEx into our RibbonControl.
>
> We have implemented a CustomToolStripDesigner, which uses reflection to load System.Windows.Forms.Design.ToolStripDesigner inside its Initialize method. We believe this reflection-based approach is not functioning correctly in .NET Core, which results in the designer not initializing as expected.
>
> In .NET Framework, this same reflection logic works correctly. As a result, the custom ToolStripEx behaves like the standard ToolStrip, supporting selection, smart tags, and full designer integration.
>
> However, in .NET Core, the reflection appears to fail silently, which causes the designer to skip initializing CustomToolStripDesigner, leading to missing selection behavior and the absence of the smart tag.
>
> We have already created a separate query for the selection and smart tag issue in .NET Core:
> https://github.com/dotnet/winforms/issues/13232#issue-2968608924
>
> It seems both issues are related to reflection not functioning as expected in .NET Core for designer initialization.
>
_Originally posted by @NagarajManimaran in [#13308](https://github.com/dotnet/winforms/issues/13308#issuecomment-2894159353)_
Contributor guide
Assessment
This issue has not been assessed yet.