Home > OS >  .Net 6 Windows Forms Designer deletes own user controls
.Net 6 Windows Forms Designer deletes own user controls

Time:02-16

I transferred an application from .net fw 4.8 to .net 6. A form contains some simple own UserControls (only containing 2 labels each). When I open the designer the controls are not being displayed anymore. When I run the application the controls are being displayed properly. When I make some change to the form (e.g. changing any property value), the designer deletes all of the custom user controls. How can I prevent him from doing this? What can I do to make the user controls to be visible in designer again ?

CodePudding user response:

The problem was solved by moving the UserControl to another assembly than the one that contained the form. The designer saw an "outdated" version of the UserControl and could not use it.

  • Related