I have a Winforms form that has 2 user controls. The controls are dynamic, i.e., they use table layout panels quite a bit to control which set of fields are visible or hidden based on user selections. I can edit the user controls in the designer with no problem. But when I try load the form (into the designer), Visual Studio hangs and eventually crashes out. Sometimes it automatically restarts, sometimes not.
Obviously, I was able to add the user controls to the form at some point, and was able to edit the form in the designer for a while before it started crashing. I can also run the app, and the form opens and works without a hitch.
In an effort to determine what is causing this, I commented out all the controls and code in the user controls and all the code in the form, but that didn't help. I created a new user control with the same controls as the old one, and added it to a new form, and I was able to load that form in the designer for a while, but then that started crashing too.
I'm not using any third-party controls, just the ones that come with .NET Framework 4.8.
I'm using version 17.5.2 of the community edition of Visual Studio 2022. I was using verison 17.5.1 and upgraded this morning to see if it would help with the problem. Unfortunately, it didn't.
I would appreciate any help to figure this out, because I have done pretty much everything I could think of.
Thanks.