'Form view designer is not working in Visual Studio 2019 with C# .NET Core 3.1 [duplicate]

When I am opening a Visual Studio project with VB.NET then the Form view designer is automatically opened, but when I open a new project with C# .NET Core 3.1 with Windows Forms then it is showing code of form1.cs.

I tried to alternate from Solution Explorer as well from menu Viewdesigner option, but it is still not showing a form. What is going wrong there?

I made a Google search for this, but I did not find anything useful on this.

Please check in the image that I'm getting during the opening project.:

Please check in the image that I'm getting during the opening project.



Solution 1:[1]

Make sure you only have the form declared in your file. If you have more than one class defined, the design viewer will not work.

Solution 2:[2]

Preview Visual Studio 2019 until v16.4 needs a VSIX separate installation extension. Now you can update your Preview of Visual Studio 2019 (to 16.5 or higher) and you don't need this extension. You can do it through the menu "Help" of the Visual Studio IDE.

After the update, go to menu Tools ? Options ? Environment ? Preview Features and check the "Use previews of the .NET Core SDK (requires restart)" option.

Restart Visual Studio and it will work ;)

You can install the Preview Version that will have all these and more feature enabled. As it’s a preview, it may be unstable, but it can run side by side with your normal version in case something is broken in preview.

Visual Studio Preview

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jman
Solution 2 Peter Mortensen