Visual Studio 2019 Crashes When Closing Windows Form in Design View

Euris 0 Reputation points
2024-12-12T20:49:16.4+00:00

Maintaining a Windows Forms application in Visual Studio 2019 (version 16.11.42) that uses Janus controls. Recently, there is a form within the application that when opened in design view indicates there are changes as soon as it is opened. Closing and saving the form causes Visual Studio to shutdown (crash). None of the other forms cause this error. There is a resource file (.resx) associated with the form design that appears to be changing. Opening and closing the form in code view does not cause any issues. The application, including this form, has been in production for over 10 years. Search results showed similar issues occurring when the form is opened in design view or happens randomly over a period of time. Applying the suggested fixes to this issue did not work.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,915 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,316 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 30,391 Reputation points Microsoft Vendor
    2024-12-13T07:52:09.46+00:00

    Hi @Euris, 

    Welcome to Microsoft Q&A! 

    You can close all running VS instances and try to delete the hidden .vs, bin and obj folders in the project folder.

    Then, reload the project and check it again. 

    As it occurs in a specific form, I suppose it is not a VS issue. Maybe you can back up the project and consider creating a new form in the project, which may help to narrow down this issue. 

    Besides, you can also try to repair your VS2019 with Visual Studio installer. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     

    0 comments No comments

Your answer

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