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

Add Nested DesignerHost Logic to DemoConsole for Handling Control Names #11866

Open
ricardobossan opened this issue Aug 13, 2024 · 2 comments
Open
Assignees
Labels
priority-3 Work that is nice to have
Milestone

Comments

@ricardobossan
Copy link
Member

.NET version

.NET 9.0.100-preview.5.24307.3

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No response

Issue description

The current implementation of DemoConsole is missing the nested DesignerHost logic responsible for generating unique control names. This logic is present in the InProc designer but absent in DemoConsole, which causes issues such as duplicate component names when working with controls like BindingNavigator. Specifically, the error arises when attempting to add multiple ToolStripSeparator items, which results in exception due to duplicate component names. This issue does not occur in runtime applications, including those targeting .NET Framework and .NET 9.0.

The absence of this logic in DemoConsole leads to a runtime bug that needs to be addressed.

Steps to reproduce

  1. Run the DemoConsole app.
  2. Attempt to add multiple ToolStripSeparator items to the BindingNavigator control.
  3. Observe that the app throws a System.InvalidOperationException due to duplicate component names.
@ricardobossan
Copy link
Member Author

Status update: #12005 (comment)

@Zheng-Li01
Copy link
Member

The issue also can reproduce for MenuStrip/ToolStrip controls in the DemoConsole application.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3 Work that is nice to have
Projects
None yet
Development

No branches or pull requests

3 participants