VB.NET designer crashes ... error ... The Base class 'System.Void' cannot be designed. Cannot access forms.

Randy Glover 0 Reputation points
2024-10-04T20:44:27.76+00:00

The base class 'System.Void' cannot be designed.The base class 'System.Void' cannot be designed.The base class 'System.Void' cannot be designed. The base class 'System.Void' cannot be designed.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,903 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,735 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jiachen Li-MSFT 32,296 Reputation points Microsoft Vendor
    2024-10-07T06:40:32.05+00:00

    Hi @Randy Glover ,

    You can try the following steps.

    1. Open the "Designer.cs" file
    2. Cut all the code and save the file
    3. Paste all the code and save the file

    Other steps involve:

    • Close and re-open the affected files.
    • Clean and rebuild project/solution
    • Delete ".VS" folder
    • Delete contents in temp folder
    • Restart Visual Studio

    Best Regards.

    Jiachen Li


    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.

    1 person found this answer helpful.

  2. Anton B 0 Reputation points
    2024-10-07T01:58:47.63+00:00

    Hi, I had the same issue, here's how I managed to get rid of it:

    1. Close all UI (designer) files currently opened in the Visual Studio IDE;
    2. Use the "Clean build" option in the "Build" drop-down menu;
    3. After that, use the "Build solution" option;
    4. Open needed UI files and check if the problem is solved;

    Hope this helps.

    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.