3

I am creating a WinForms application in .Net Core 3.1 using Visual Studio 2019.

This is how my app looks like.

enter image description here

But on click form Form1.cs I don't see the designer window. While when I created the same using .Net Framework v4.7.1

I can see the designer window.

As per the below link, with visual studio 2019, I dont need any extra configuration/vsix to do so.

This is how tools options window looks like

enter image description here

Don't see any such option to enable it.

Please check & suggest how can I get the designer window & use the toolbar to design the WinForms app when using .Net Core 3.1

Thanks!

Kgn-web
  • 7,047
  • 24
  • 95
  • 161
  • 2
    I take it you've enabled the Designer functionality in VS Options? `Tools > Options > Environment > Preview Features and select the Use the preview Windows Forms designer for .NET Core apps option.` – Adrian Jan 23 '20 at 10:32
  • You need to *enable* the Forms Designer. It's still a preview feature – Panagiotis Kanavos Jan 23 '20 at 10:35
  • @Adriani6 I don't any such option. Added the attchment of the same in the post – Kgn-web Jan 23 '20 at 10:37
  • @PanagiotisKanavos Please check the updated post & the above comment. Thanks! – Kgn-web Jan 23 '20 at 10:37
  • 1
    @Kgn-web That would suggest you're not running the most up-to-date version of Visual Studio. That option is only available in version 16.5 Preview 1 or a later version – Adrian Jan 23 '20 at 10:38
  • @Adriani6 It's been just **a day** that I downloaded & installed VS 2019 IDE – Kgn-web Jan 23 '20 at 10:40
  • My solution was to add a second project to the solution. One with .net core 3 and one with .net framework 4.7.2. Both pointing to the same forms and classes. But don't know if it is a good solution, because on 4.7.2 you have infinite controls, on .net 3 I had only 20 controls on the toolbox and wasn't able to add more. – Adriano Jan 23 '20 at 10:43
  • @Kgn-web Verify what version you're running. You only mention "Visual Studio 2019". It verifying that might narrow down the issue. – Adrian Jan 23 '20 at 10:44
  • @Kgn-web you still need to enable the designer. I did so just yesterday. The checkbox should be third from the bottom. Did you install the *latest preview* or the latest RTM version ? – Panagiotis Kanavos Jan 23 '20 at 10:51

2 Answers2

6

Prior to Visual Studio 2019 16.5 Preview 1 you have to install the .NET Core WinForms designer via a VSIX installer.

From Visual Studio 2019 16.5 Preview 1 onwards it is part of Visual Studio but you need to enable it.

Alan B
  • 4,086
  • 24
  • 33
2

I addition to enabling winforms, keep in mind that not all .Net Framework controls are supported in .Net Core 3.1.. you can revert back to this links for more details.

However here is a simple trick to enable all the missing controls:

Emad Mohamed
  • 97
  • 2
  • 10