Re: UserControl and .NET 5
Can I see what the actual UserControl code is? Depending on the complexity of a UserControl, you can sometimes induce a lot of conflict with the Visual Studio designer if you don't account for it correctly. It's been a while since I wrote any custom control code but hopefully I remember enough to spot a problem
Re: UserControl and .NET 5
Does it matter that the user control is used in other dlls in the project as well as other forms in the dll that it is defined in? I compared the use to a form in a different dll that has been using the control for years. The only differences were these:
1) In this new form, I had the control on a panel...but I just decided that it doesn't even belong on the form (nor does the panel), so that's a change I'll be making tomorrow.
2) This new project is .NET5, whereas the usercontrol was originally built against FW 4.0, which was then migrated to 4.5.
This is largely a foray into seeing what issues, if any, I run into using .NET5 plugins in a FW based application. I might end up moving the whole project into .NET5, but am taking my time. Thus far, this is the only issue I have seen, and I don't know that it has anything to do with .NET5.
I've shut that down for the day. I'll pick it up again tomorrow.
Re: UserControl and .NET 5
I wrote quite a bit of custom controls in previous years and I used to get problems with the designer making thing disappear all the time. Most of the time it used to be because I didn't implement certain things properly. Your problem might be different though.
Usually with problems like this, what I'd do is start simple and keep adding things until I encounter a problem. So for example, I'd just start with a blank empty UserControl and see if the same thing happens. If nothing happens then I'd add things to it one by one until I have something resembling the complete UserControl. This step by step approach is very tedious but sometimes this is what it takes to solve problems like this.