dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.37k stars 966 forks source link

Custom .NET Standard 2.0 components aren't displayed in Toolbox in VisualStudio v17.8 #10393

Open mikhailovalex opened 10 months ago

mikhailovalex commented 10 months ago

Environment

Microsoft Visual Studio version 17.8.0

.NET version

.NET 6.0 - WinForms

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

Yes, it works in Visual Studio v17.6.5. image

Issue description

Hi, I'm from DevExpress. Our users encountered an issue where some of our components are not displayed in WinForms .NET OOP DesignTime. In our .NET Standard 2.0 libraries, we have custom inheritors of the Component class. This issue started in Visual Studio v17.8 (or earlier). After a little research, it appears to be related to the following tab: https://github.com/microsoft/winforms-designer/pull/5231/. To demonstrate the issue, we created a small example.

Steps to reproduce

To reproduce it, follow these steps.

  1. Download and unzip NetStandardProblem.zip.
  2. Open the designer Form1.cs.
  3. Make sure that MyComponent from ClassLibrary1 is not displayed in the toolbox. image2

Diagnostics

No response

elachlan commented 10 months ago

@Olina-Zhang can your team please test this?

Olina-Zhang commented 9 months ago

We can repro it in 17.8.0 and the latest 17.9 build.

merriemcgaw commented 9 months ago

Thanks for the issue - we're working on some improvements in the ToolBox and it looks like this scenario may have regressed. @KlausLoeffelmann to take the first look. @Olina-Zhang can you please create an issue in the internal designer repo and assign @KlausLoeffelmann?