Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Open Form [Design] View in Windows Desktop Form .NET Core Application

When I create a new Windows Desktop Form Application using .NET Core with the latest Visual Studio 2019 Community Edition update, I cannot view the design view of the form, i.e., Form1.cs[Design]. When I click on the appropriately labeled Form1.cs file, it only opens up the code view.

New Solution Open Form1.cs code view only

like image 241
Jason Blazzard Avatar asked Oct 16 '19 00:10

Jason Blazzard


People also ask

What is WinForms forms + NET Core?

Windows Forms + .NET Core allows you to ship your UI framework with your application, independently of the version of the framework installed with Windows. This puts it in line with Qt, Swing, and most other GUI frameworks.

How do I create a Windows Forms app in Visual Studio?

If your intention is to create a .NET Framework project (with the mature designer support), just find and select Windows Forms App (.NET Framework). If you want to work with .NET Core project, don’t forget to install the .NET Core Windows Forms Designer, since it isn’t yet shipped inside Visual Studio by default.

How do I enable the Windows Forms Designer experience in NET Core?

Don’t forget to enable the designer in Tools > Options > Environment > Preview Features. Many of you may remember that we open-sourced Windows Forms and ported it to .NET Core with .NET Core 3.0. Since then, we’ve been hard at work bringing the Windows Forms designer experience to .NET Core.

Is there a Windows Forms Designer in Visual Studio 2016?

If it is a Windows Forms App (.Net Core), there is no Designer by default. The .NET Core Windows Forms designer is available with the Visual Studio 16.5 Preview 1. So you can try to update Visual Studio to Visual Studio 16.5 Preview 1 or a later version.


1 Answers

Edit: At the time the question was asked Microsoft hadn't released the visual designer for WinForms in .NET Core in Visual Studio 2019. It needed a separate preview install. By May 2020, Visual Studio version 16.6, the designer was still in preview but could be enabled from Tools/Options/Environment/Preview Features/'Use the preview Window Forms designer for .NET Core apps' without needing an install.

As of November 2020 the designer is still in preview, but is enabled by default in projects in Visual Studio 2019 version 16.8 and later. It's still not complete, particularly re data binding, but the number of issues is much smaller. It can now be disabled via the Tools/Options menu as discussed above.

like image 136
Rich N Avatar answered Sep 30 '22 06:09

Rich N