Hello @jan tomamak,
As you can see, the error is related to the designer. Normally, you shouldn’t get this error when you are using the designer to develop your application.
However, I notice that you are using C++ and Winforms. I’m not sure which project type you are using, but I guess it was created and developed by using a previous version of Visual Studio.
I see following description in this document: IDE.
Although we recommend that you do not create Windows Forms applications in C++/CLI, maintenance of existing C++/CLI UI applications is supported. If you have to create a Windows Forms application, or any other .NET UI application, use C# or Visual Basic. Use C++/CLI for interoperability purposes only.
And this document: Windows Form Application and Windows Form Control Library project wizard templates for VC++ no longer exist in Visual Studio 2012 and Visual Studio 2013.
Windows Form Application and Windows Form Control Library wizards in C++/CLI have been removed from Visual Studio 2012 and Visual Studio 2013.
Though Visual Studio 2022 still supports it, the project templates were removed. So, it’s possible that this issue is a potential issue.
You can click Help > Send Feedback > Report a Problem to report this issue to Visual Studio Product Team and kindly wait for the latest information.
I also see some workarounds which may be helpful. You can have a try.
- Rebuild the project.
- Remove the hidden .vs folder and the x64/32 folder.
- Sometimes, restarting VS, or like what you have mentioned, closing the tab/switching to other code and restarting VS work.
Kind Regards,
Tianyu
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.