dotnet / winforms

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

Some times ToolBox not populated with user control from Nuget #8360

Open kirsan31 opened 1 year ago

kirsan31 commented 1 year ago

Environment

Microsoft Visual Studio Community 2022 Version 17.4.2 VisualStudio.17.Release/17.4.2+33122.133 Microsoft .NET Framework Version 4.8.09032

.NET version

.Net6 .Net7

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

No

Issue description

This also coming from our discussion with @KlausLoeffelmann. Working on porting chart control designer I ran into the following issues.

In the solution I have control itself and test WinForms project that reference nuget package of the control. So we must have 2 controls on ToolBox (one from project and one from nuget): image

  1. Some times ToolBox not populated with Nuget control version (the control from project is always here).
    • Even when we have not see control from nuget, when we drug project control version - all client/server staff are working, so it's only ToolBox problem.
    • Need to restart studio (sometimes many times) until it shows up.
      1. Not a bug but very annoying. The client side of the control designer is loading and caсhing on first opening of the test project form in the designer. After that if you have modified client side, you need to restart VS to see this changes. I have test project with * reference to package and more of it with nuget restore before build - this not help. Designer populate and cache ToolBox only on first load (even close and reopen solution not helps). May be add some way to reload / repopulate ToolBox manually? It's also helps with previous bug :)

Steps to reproduce

  1. Pull https://github.com/kirsan31/winforms-datavisualization/tree/dev
  2. Build.
  3. Open Form1 from DesignerTest project in designer and see on TooLbox. a. If you see only
    image here - you've got it :) b. If you see both versions - restart VS and do point 3. Repeat (sometimes the bug appears immediately, sometimes it takes about 10 restarts) until you see only one.

Diagnostics

No response

merriemcgaw commented 6 days ago

@KlausLoeffelmann has this been an issue for you lately? I haven't heard reports in a very long time. @kirsan31, how about you?

kirsan31 commented 6 days ago

I think if #8348 not actual, then this can be safely closed too. Or just close this one due to low priority :)