Error Screen When Opening VB Form Design Module

njl100 41 Reputation points
2021-07-28T14:46:19.71+00:00

In Visual Studio 2019 Community Edition I have started getting the attached error screen when I open the form design module for 1 of my forms. This has just started appearing for no apparent reason. The variable concerned is a User Control I created in the app a few years ago and have not touched since and I haven't a clue how to fix this. If I ignore the error message and go into the form it looks ok, the application will build ok and it runs ok with no obvious errors on this particular form.
I saved a snapshot of the solution about a year ago so restored that onto my system and did a code compare both for the designer modules for the user control and for the form on which it is happening and they are identical to those on the current system. The error screen does not occur when I open this form on this old version of the solution.

Can anyone suggest what I need to do to make this problem go away.

TIA

118754-capture.jpg

Developer technologies | VB
0 comments No comments
{count} votes

Answer accepted by question author
  1. Michael Taylor 61,096 Reputation points
    2021-07-28T15:30:56.603+00:00

    Couple of things come to mind.

    1) If the UC type is in the same project then the project must build before the designer can load it properly. Often it is better to keep the controls in a separate project so the designer can load them even if the main app doesn't compile.
    2) Are you using the new Winforms designer? If so switch to the legacy designer and see what happens. It could be a bug in the new designer.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.