VS 2026 will not show form designer after creating a new VB Windows Forms App targeting .NET 10 Framework

Mike Larson 0 Reputation points
2026-09-08T15:06:41.3833333+00:00

I am trying to create a new Visual Basic Windows Forms App for .NET 10.0 in Visual Studio 18.9.2. Once the new project is created, I cannot get a Form Designer opened.

I have found a number of possible solutions to this on the web, but nothing I try has worked. Things I have tried include: deleting the bin, obj, and .vs folders, deleting the WinFormsDesigner folder (although my computer doesn't have a WinFormsDesigner folder in my C:\Users(MyUserName)\AppData\Local\Microsoft\VisualStudio\18.0_127f3d0b, The target CPU is Any CPU, there is a line in the Form1.Designer.vb file for Inherits System.Windows.Forms.Form, I cannot force a Form Designer to open by right clicking on the file and clicking View Designer.

I have noticed that in the Form1.Desinger.vb code, there is no Public Sub New() function.

This is the full code in the Form1.Designer.vb file:

Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
        AutoScaleMode = AutoScaleMode.Font
        ClientSize = New Size(800, 450)
        Text = "Form1"
    End Sub

End Class


This is the Project file

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net10.0-windows</TargetFramework>
    <StartupObject>Sub Main</StartupObject>
    <UseWindowsForms>true</UseWindowsForms>
    <MyType>WindowsForms</MyType>
  </PropertyGroup>

  <ItemGroup>
    <Import Include="System.Data" />
    <Import Include="System.Drawing" />
    <Import Include="System.Windows.Forms" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="My Project\Application.Designer.vb">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <None Update="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>

</Project>

In the Project Properties, Windows Forms option is checked and Form1 is set as the Startup Object.

Is this a known issue? Is there a workaround?

Thank you for any help.

Developer technologies | Windows Forms

2 answers

Sort by: Newest
  1. Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
    2026-09-09T03:08:17.4666667+00:00

    Hi @Mike Larson ,

    Thank you for the screenshots and the checks you have already completed. Thank you also to RLWA32 for testing the same Visual Studio version and reporting that “the Form Designer appeared”, and to Viorel for suggesting “Try to update Visual Studio” in the September 8 comments.

    The code screenshot shows the DesignerGenerated attribute on the first line, matching the line RLWA32 highlighted. This supports your clarification that it was missing only from the pasted text. There is no need to add that attribute again.

    Regarding the missing Public Sub New(), Microsoft explains that DesignerGeneratedAttribute allows the VB compiler to call InitializeComponent from the generated default constructor. Therefore, not seeing an explicit constructor does not, by itself, indicate a problem. See Microsoft Learn: DesignerGeneratedAttribute.

    I would also leave <StartupObject>Sub Main</StartupObject> unchanged for now. This setting appears in Microsoft’s VB WinForms template for .NET 10, so its presence alone is not evidence of an incorrect configuration.

    Since you have already tried opening the designer directly and creating multiple new VB projects, I suggest these next checks instead:

    1. Following up on Viorel’s suggestion, please share whether you have tried the update, your current full Visual Studio version, and whether the behavior changed. This is a follow-up to the existing suggestion, not confirmation that the update fixes this issue.
    2. Build one affected VB project and share the first error if it fails. Also, try a new C# Windows Forms App targeting .NET 10 in the same Visual Studio installation. This comparison would help determine whether the behavior is specific to VB.
    3. Collect the designer log. The code screenshot has Immediate Window selected, so it does not show the designer output. Microsoft documents the logging setting under Tools > Options > Windows Forms Designer > General > Logging Level. Select Verbose if available, try opening the designer again, then check View > Output for the Windows Forms Designer log. If that output entry does not appear, please mention it. See Microsoft’s Windows Forms designer troubleshooting guide.

    Please redact personal information and sensitive paths before sharing logs publicly. The screenshots help clarify the generated code, but they do not yet establish the cause of the designer issue.

    If you found my response helpful or informative, I would greatly appreciate it if you could provide feedback by interacting with the system or leaving a comment below.

    Thank you.

    Was this answer helpful?


  2. AI answer

    2026-09-08T15:07:05.0366667+00:00

    Public Sub New() not being present in Form1.Designer.vb is not the documented cause of the Windows Forms designer failing to open.

    The supported checks and fixes for this scenario are:

    1. Open the form from the project context, not as a standalone file.
      • The Windows Forms designer requires the file to be a member of a project that supports designers.
      • If a file is opened outside a supported project, Visual Studio can show the error that the language for the file does not support the necessary code parsing and generation services.
    2. Check whether the designer is showing an error page.
      • When the Windows Forms Designer fails to load, Visual Studio shows an error page with yellow error bars.
      • Expand the error entries and use the link to jump to the exact code location causing the designer load failure.
      • If available, inspect the call stack from the designer error page.
    3. Build the project before opening the designer.
      • If Visual Studio cannot find a base class that satisfies designer requirements, one documented fix is to make sure the project has been built.
    4. Verify the form class is designable.
      • A Windows Form must derive from a base class that supports designers.
      • Inherits System.Windows.Forms.Form is the expected pattern for a form.
    5. Close and reopen the designer.
      • Visual Studio normally reloads the designer automatically after changes, but sometimes the designer must be closed and reopened manually for changes to take effect.
    6. Make sure the file is not open in an incompatible editor mode.
      • A documented cause of designer load failure is when another editor already has the file open in an incompatible mode. Close that editor and try again.
    7. If the project references any 32-bit component, remove or replace it.
      • Visual Studio 2022 and later run as a 64-bit process and cannot load 32-bit components at design time.
      • References that compile to 64-bit or target AnyCPU continue to work, but a referenced dependency can still break design time if it ultimately depends on something 32-bit.
    8. If the project was modified to use a custom startup object, correct the startup object entry in the project file.
      • For VB Windows Forms projects, a documented workaround for custom Sub Main startup is to set the project file’s StartupObject to the fully qualified module name, such as projectname.Module1, instead of Sub Main.
      • An incorrect startup object can cause VB project configuration problems.

    Based on the provided project file, the most suspicious item is:

    <StartupObject>Sub Main</StartupObject>
    

    The documented workaround is to change that to the fully qualified module name, for example:

    <StartupObject>YourProjectName.Module1</StartupObject>
    

    Then rebuild the project and try opening Form1 in the designer again.

    If the designer still does not open, the next supported path is to inspect the designer error page for the exact compiler or loader error, because the designer commonly fails due to code-behind, project configuration, or component-loading errors rather than the .Designer.vb file layout itself.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer 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.