Windows Forms-Designer not working after switch from VS2015 to VS2022

Morgil 1 Reputation point
2022-05-30T12:11:10.73+00:00

Hey,

we have recently started do switch from VS2015 to VS2022 and most Windows Forms projects now have the following Exception in the Forms-Designer:
Der Designer konnte für diese Datei nicht angezeigt werden, da keine der enthaltenen Klassen definiert werden kann. Der Designer hat folgende Klassen in der Datei überprüft: frmNavigator -- Die clsMyForm.clsMyForm-Basisklasse konnte nicht geladen werden. Stellen Sie sicher, dass auf die Assembly verwiesen wurde und alle Projekte erstellt wurden.

This problem occurs on every Form which inherits “clsMyForm”. “clsMyForm” is a class that inherits “System.Windows.Forms” and references a few of our other projects to provide some standard functionality.
The entire project-folder is still compiling and still executes, but the Forms-Designer cannot be opened anymore.

After some Experimenting I believe the problem could be with the fact, that “clsMyForm” has references to other projects so there is now a “chain of dependencies” (no circles), although I am not sure.

Everything is coded in VB with .NET Framework 4.7.

Has anyone ever had a similar issue?
Does anyone know what the problem could be?
Does anyone have an idea how to fix the Forms-Designer?

Thanks in advance!

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,718 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 31,091 Reputation points Microsoft Vendor
    2022-05-31T09:00:32.557+00:00

    Hi @Morgil ,
    WinForms 32-bit .NET Framework components do not currently work in the Windows Forms Designer in Visual Studio 2022.
    You can choose to use Visual Studio 2019.
    https://developercommunity.visualstudio.com/t/WinForms-NET-Framework-Projects-cant-d/1601210
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    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.


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.