Introducing .NET Core Windows Forms Designer Preview 1

Olia Gavrysh

Olia

Introducing .NET Core Windows Forms Designer Preview 1

We just released a GA version of .NET Core 3.0 that includes support for Windows Forms and WPF. And along with that release we’re happy to announce the first preview version of the Windows Forms Designer for .NET Core projects!

For developers the .NET Core Windows Forms Designer (when we will release the GA version) will look and feel the same as the .NET Framework Windows Forms Designer. But for us it is a huge technical challenge to bring the designer to .NET Core because it requires the design surface that hosts the live .NET Core form to run outside the Visual Studio process. That means we need to re-architect the way the designer surface “communicates” with Visual Studio. You can watch these communications in the Output Window, where we track each request sent when the Visual Studio components are accessing properties or executing methods on the live controls in the design surface. The engineering team is still working on this technical challenge, and we will be releasing the Preview versions on regular basis to give you the early glance at the .NET Core Designer. Stay tuned! The next Preview will be coming out in early November.

Because this is the very first preview of the designer, it isn’t yet bundled with Visual Studio and instead is available as a Visual Studio extension (“VSIX”) (download). That means that if you open a Windows Forms project targeting .NET Core in Visual Studio, it won’t have the designer support by default – you need to install the .NET Core Designer first!

Enabling the designer

To enable the designer, download and install the Windows Forms .NET Core Designer VSIX package. You can remove it from Visual Studio at any time. After you install the .NET Core Designer, Visual Studio will automatically pick the right designer (.NET Core or .NET Framework) depending on the target framework of the project you’re working on.

It is early days for the designer, here is what to expect…

Please keep in mind, that this is the first preview, so the experience is limited. We support the most commonly used controls and base operations and will be adding more in each new Preview version. Eventually, we will bring the .NET Core Designer at parity with the Windows Forms Designer for .NET Framework.

Because many controls aren’t yet supported in Preview 1 of the designer, we don’t recommend porting your Windows Forms applications to .NET Core just yet if you need to use the designer on a regular basis. This Preview 1 is good for “Hello World” scenarios of creating new projects with common controls.

Controls included in Preview 1:

  • Pointer
  • Button
  • Checkbox
  • CheckedListBox
  • ComboBox
  • DateTimePicker
  • Label
  • LinkLabel
  • ListBox
  • ListView
  • MaskedTextBox
  • MonthCalendar
  • NumericUpDown
  • PictureBox
  • ProgressBar
  • RadioButton
  • RichTextBox
  • TextBox
  • TreeView

What is not supported in Preview 1:

  • Container
  • Resources
  • Component Tray
  • In-place editing
  • Designer Actions
  • Databinding
  • User Controls/Inherited Controls

Give us your feedback!

We are putting out our first bits so early to support the culture of developing the product with our users’ early feedback in mind. Please do reach out with your suggestions, issues and feature requests via Visual Studio Feedback channel. To do so, click on Send Feedback icon in Visual Studio top right corner as it is shown on the picture below.

We appreciate your engagement!

Addressing Questions

What to do if Windows Forms Designer doesn’t work?

We heard some question related to the Windows Forms Designer not working. Here’s what could have happened:

  1. You might have created a .NET Core Windows Forms project instead of the traditional .NET Framework one without realizing it. If you type “WinForms” or “Windows Forms” in the New Project Dialog, the first option would be a .NET Core Windows Forms project. If your intention is to create a .NET Framework project (with the mature designer support), just find and select Windows Forms App (.NET Framework).

  2. 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. See the previous “Enabling the designer” section.

Does .NET Core WPF Designer depend on Windows Forms Designer installation?

We also received some questions related to the .NET Core WPF Designer not working and if it requires a separate installation or the Windows Forms Designer installation. No, the WPF Designer is completely independent of the Windows Forms Designer. We released its GA version of the WPF .NET Core Designer at the same time as .NET Core 3.0 and it comes with Visual Studio. In Visual Studio version 16.3.0 we had an issue with the Enable XAML Designer property set to false by default. That means that when you click on .xaml files, the designer doesn’t open automatically. Upgrade to the latest Visual Studio version 16.3.1 where this issue is fixed. Another option to fix it is to go to Tools -> Options -> XAML Designer and check Enable XAML Designer.

106 comments

Comments are closed. Login to edit/delete your existing comments

  • Avatar
    James Riby

    Will apps made with this only run on Windows? If not and they’re cross-platform, how does that work? Thanks

        • Avatar
          Hall, Trevor

          @Alex This may not be of value to your business, but: Would be extremely valuable to companies (like the one I work for) who have put millions of $ into Windows desktop apps, built with C#. Since .NET framework is now “dead” we have to move to .NET core (when it is ready…). As of today, we see the .NET core 3.0 release as a non-event, as we cannot use it for Windows desktop application development. (We removed all goals of using this in 2019, due to this issue). We are also dead in the water, as we cannot get any of our apps to communicate with services (which are on a very slow release cycle from us, due to the years it takes us to validate them…). This is because all prior communication technologies were removed (Remoting, WCF). But: We are pushing forwards. We absolutely need the “real release” of .NET core 3.x for Windows desktop apps. We have had to budget a large chunk of $ into “adapter projects” to get .NET core 3 based code to connect to framework based services. Actually, it almost the same problem that the VS team must be having getting the “Windows designer” to connect. So back to your question: The point is: without this, all companies who produce Windows desktop apps would have to stop using Microsoft code, if they did not offer any UI for Windows.

  • Avatar
    Bryan W

    Thank you very much for the work on this. I know all the cool kids treat WinForms like its made of arsenic, but some of us work in a small shop for a small company maintaining and adding to a 15+ y/o code base and spending the time converting 100s of WinForms apps to something “better” is not a real option.

    Finally, a way forward for those of us not blessed to be working in the green fields.

  • Avatar
    Taylor, Matt

    Hi Olia,
    This is great news.
    Will Forms be updated to support scaling? 4K screens are out there, and the dialogs are almost unreadable.

    Please advise!

    Thanks.

  • Avatar
    Tele Xer

    Hello,
    What version of .Net are supported on new Windows 10X used by the new dual-screen Surface?
    .Net Framework, .Net Core, .Net Standard ???
    If there is an existing blog post that discusses .Net on Windows 10X, please reply with the link.
    Thank you.

  • Avatar
    Andrew Hanlon

    But for us it is a huge technical challenge to bring the designer to .NET Core because it requires the design surface that hosts the live .NET Core form to run outside the Visual Studio process. That means we need to re-architect the way the designer surface “communicates” with Visual Studio. You can watch these communications in the Output Window, where we track each request sent when the Visual Studio components are accessing properties or executing methods on the live controls in the design surface. The engineering team is still working on this technical challenge

    This is very interesting. One of the ‘open issues’ for .net Core is the story of local IPC. On GitHub the discussions around general IPC have mostly devolved to ‘build your own’ using low-level solutions (named-pipes, sockets) or RPC solutions (gRPC). Can I ask what technology for local IPC is being used to back this out of process hosting? Thanks!

      • Avatar
        Andrew Hanlon

        Thank you for the details and link! This looks great – oddly enough I had recently played around with a similar approach (without the JsonRpc contract) using the DispatchProxy class for generating the client proxy (not that simple when using async wrappers).

  • Avatar
    Greg Sohl

    Too bad they can’t use WCF for simple RPC calls. That would make it easy. But … we know why that’s not available.

  • Avatar
    John Eakins

    Tried this. the visual form designer doesn’t load. can’t view the form. only the Xamarin code and the code behind files for Form1
    What am I doing wrong, or what is going on?

  • Avatar
    John Eakins

    downloaded the package and installed on Visual Studio 2019. Everything’s there except the visual form designer. It doesn’t open or come up on the screen. What’s up with that???
    John