VS 2019, Windows Forms-App, Designer is not displayed

rds

New member
Joined
Sep 28, 2019
Messages
3
Programming Experience
5-10
Creating a Windows Forms-App for C# does not display the designer (Form1). A change between code and design-modus (via menu view) is not possible. Only the code is displayed.
Is this behavior known and how can you fix that?
Version is VS Community, 16.3.1
 
It happens with every project. Already while creating a new project , Windows Forms-App(.net Framwork) for C#.
When creating a similar project for Visual Basic, everything works fine. The designer appears and switching from code to design-modus is possible. But not for C#.

When creating a WPF App (.Net Core) for C# everthing is also ok. The designer appears. The problem is only for Windows Forms-App for C#.

I'm wondering if this is just a known bug of the community version.
 
Last edited:
Can you post your project xml file please?

I'm wondering if this is just a known bug of the community version. => Not that i am aware of.
 
You mention a .NET Core WPF project but a .NET Framework WinForms project. Can I just confirm that the WinForms project is indeed .NET Framework and not .NET Core, because the WinForms designer for .NET Core isn't available yet, so that would be an explanation in that case. If it is .NET Framework though, I can;t think of any legitimate reason.
 
You mention a .NET Core WPF project but a .NET Framework WinForms project. Can I just confirm that the WinForms project is indeed .NET Framework and not .NET Core, because the WinForms designer for .NET Core isn't available yet, so that would be an explanation in that case. If it is .NET Framework though, I can;t think of any legitimate reason.

The problem is with Windows Forms-App (.Net Core), see attached screen shot.
If it's true, that the WinForms designer for .NET Core isn't available yet, this would be an explanation for my problem.
Now I have noticed, that there is also a project template for Windows Forms-App(.net Framework). With this project type everything is ok. The designer appears.
So Your answer helped me a lot. Many Thanks.
 

Attachments

  • Screenshot 2019-09-28.jpg
    Screenshot 2019-09-28.jpg
    102.1 KB · Views: 1,715
If you really want to create a WinForms app targeting .NET Core then what you can do is add a WinForms project targeting .NET Framework to the solution, design your form in that project and then simply copy the code in the designer file from the Framework project to the Core project. I just tested it with a simple example and it worked without issue. Not sure whether some complex things might not work though. Once the designer is ready, you can just delete the Framework project and everything should just work as intended.
 
Back
Top Bottom