The process of installing, configuring, and customizing Visual Studio to support development workflows across languages, platforms, and workloads.
The error means the Windows Forms Designer can’t find or load a valid base class for the form, so it falls back to System.Void and refuses to design it. This is a design‑time problem, not a runtime one.
To permanently fix it, focus on the designer’s base‑class requirements and the project’s build settings:
- Verify the form’s base class
- Open the affected
.vbfile in Code view. - Ensure the form class inherits from a designer‑supported base, for example:
Public Class MyForm Inherits System.Windows.Forms.Form End Class - If it inherits from a custom base form, make sure that base form itself inherits from
System.Windows.Forms.Form(or another designer‑supported type) and is in a project that builds successfully.
- Open the affected
- Ensure the base class is in a buildable, referenced assembly
- If the base form is in another project, confirm:
- That project builds without errors.
- The current project has a reference to that project/assembly.
- If the base class can’t be loaded, the designer shows errors like “The base class '<class name>' could not be loaded” or “none of the classes within it can be designed.” In that case, rebuild the solution, fix any compile errors, then reopen the designer.
- If the base form is in another project, confirm:
- Check platform target for base‑form assemblies
- Visual Studio is a 32‑bit process and cannot load a base form from a 64‑bit‑only assembly at design time.
- If the base form (or a library it lives in) is compiled with
x64or Itanium as Platform Target / Target CPU, the designer cannot open inherited forms from it. - To fix this permanently:
- For VB: Project Properties → Compile → Advanced Compile Options → set Target CPU to
AnyCPUfor the project that defines the base form. - For C#: Project Properties → Build → set Platform target to
AnyCPUfor the project that defines the base form.
- For VB: Project Properties → Compile → Advanced Compile Options → set Target CPU to
- Rebuild the solution and reopen the form in the designer.
- Make sure the form file layout is designer‑friendly
- Visual Studio requires the designer to use the first class in the file.
- If the form class is not the first class in the
.vbfile, move it so it is the first class, then reload the designer.
- Use the designer error page to locate code issues
- When the designer fails, it shows an error page with yellow bars listing the exact file, line, and column of the problem.
- Use the “jump to location” link in that error page to fix the offending code (for example, invalid identifiers, missing event handlers, or code in
InitializeComponentthat throws at design time).
- General design‑time checks
- Confirm the class name and identifiers are valid VB identifiers.
- Ensure there are no circular references (for example, a form creating another instance of itself in
InitializeComponent). - Make sure the project builds cleanly before opening the designer.
Once the base form is in an AnyCPU (or otherwise designer‑loadable) assembly, inherits from a designer‑supported type, is the first class in the file, and the project builds without errors, the designer error will stop occurring and forms will no longer need to be recreated.
References: