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.

Olia Gavrysh
Olia Gavrysh

Program Manager, .NET

Follow Olia   

98 comments

          • Avatar
            Death Se3ker

            You should just probably learn C#, its not that hard if you know VB, you will be better of, I did that a long time ago.

          • John McCourt
            John McCourt

            I started programming SuperBASIC on a Sinclair QL when I was 10 during the early 90s. I’ve lost count of the number of times I’ve had to update my programming skills since then. It usually is annoying having to modernise, but I can’t think of a time when there hasn’t been some good rationale behind it. VB6 to .NET was a big one and .net is huge compared to the old way of doing things. Php 5.x to 7.x was faster, had a lot of security fixes and better object orientation. Now I’m going through the same with C# .Net Framework and .NET Core but I read a bit about why and it makes sense to me.

            Some of the rationale for this update is that .NET Framework is now over 17 years old. It grew and grew while having to keep backwards compatibility. For legacy projects that’s great, but why should a brand spanking new project need to have all the frameworks for backwards compatibility going back 17 years? So MS have made fresh a new framework from the ground up that doesn’t have all that unnecessary stuff and is built on modern, secure framework built for today’s application styles. A new .NET Core deployment only has what it needs to have, not all that archaic stuff from years ago and supposedly it’s not restricted to deployment on Windows which is quite a big deal for people coming from Linux/FreeBSD backgrounds.

            Personally I’m enjoying this. The C# guys at my company have big egos because they have more experience in C# than I do, but only with .NET Framework. I’m now the guy with the most C# Core .NET and MVC Core .NET and can joke that they are using a legacy programming language/framework and all their code is legacy code. They can never be more senior in .NET core than me 😉

      • Avatar
        Craig Johnson

        I got it working no problem with VB.NET. WinForms with the designer preview as well as Console apps work great with .NET Core 3.0. The New Project template for VB WinForms on .NET Core is missing but you can create a Console VB .NET Core app and then replace the .VBProj info from a working .CSProj WinForms .NET Core app and it all works.

  • Avatar
    Sérgio Terenas

    RDLC ReportViewer is a component we’d need to be able to modernize our winforms app. Will you also convert this component to .net core? Thanks Olia for the great presentations and info you’re sharing.

      • Avatar
        Heinrich Moser

        Ah, great, then I will add my feedback regarding RDLC as well!

        The important part would be porting the renderer, i.e., the engine rendering an RDLC file to a PDF or an EMF (for printing), to .net core. (Yes, an XPS renderer for “modern printing” would be nice as well, but that’s another issue.) The actual “ReportViewer” preview UI component is not relevant (at least for us), since previewing an EMF stream in WinForms/WPF or previewing a PDF in HTML are solved problems with widely-available existing solutions.

        I do have high hopes for RDLC (since you acquired the Forerunner library), and I am looking forward to any news/roadmaps/rumors you can share with us.

      • Avatar
        Daniel Smith

        Good to hear it’s under review. The ReportViewer control is critical for many of my desktop apps that produce reports. This is currently the only thing that’s preventing me from upgrading to .NET Core.

        If it turns out to be too big a project to migrate ReportViewer, is there any possibility of open sourcing it, so the community can help?

        Congratulations on getting the designer working as well – really appreciate all the effort that’s going into bringing the full productivity of WinForms into Core 🙂

  • Avatar
    Jimmy Schwietert

    Wouldn’t the inclusion of Windows only features, like Windows Forms and System.DirectoryServices, go against the premise of Core? Core was supposed to be a cross platform language that could be executed on Windows, Linux and Mac.

    • Raul Rodriguez
      Raul Rodriguez

      For me it is about choice. I can create a headless application that runs on Windows, Linux and Mac. I can port my very big existing WinForms application to .NET Core and get all the goodies (performance, enhancements, …) and for me it is ok (and understandable) that it will be Windows-only. I would prefer every day this solution than rewriting my application with a new UI framework to be able of running under Linux or Mac. Our current approach for cross platform is web development.

    • Avatar
      Stephen Donaghy

      The “premise” of core isn’t just about making everything run on every system. It was mainly to decouple the framework from Windows itself, but that doesn’t mean you can’t use things that are specific to a certain platform. It’s about choice and giving you the options to use something platform specific if you want, but without forcing to you.

      If you go down the route of “Well this is a platform specific thing, so we’re not including it” then you’ll lose all kinds of other stuff like platform intrinsics, GPIO for your raspberry pi and so on. You won’t be able to port to IoT devices without gutting the entire platform because you have to only support the lowest common denominator.

    • Olia Gavrysh
      Olia Gavrysh

      Thanks for the great responses above Raul and Stephen! I can only add that WinForms and WPF are available for .NET Core as a separate desktop workload, so if you don’t need them, you won’t receive the desktop SDK and it won’t affect you in any way. But if you are a WinForms or WPF developer, there are many great features that become available with .NET Core like side by side deployment of different .NET Core versions, single .exe files, self-contained applications with smaller sizes, performance, new language features and so on. As Stephen pointed out, .NET Core is not only about being cross-platform, it is the future platform of .NET that will receive all the improvements going forward. We didn’t want to leave our desktop developers behind, so now they’re able to receive all Benefits of .NET Core as well.

  • Eric Rasmussen
    Eric Rasmussen

    Very nice, thank you! I want to experiment with this alongside compiling the entire thing into a single trimmed-down EXE. Being able to ship a single binary that contains all dependencies is one of my favorite features of .NET Core 3. Being able to ship a single-binary WinForms application would definitely make deploying my software a lot easier.

    Sometimes there is nothing better than WinForms for tossing an idea together in an afternoon. I look forward to playing with the early bits, thanks for releasing it!

  • Serhii Gl
    Serhii Gl

    At the main page of blogs it is declared .NET Core. Free, multi platform, open source. Still here we see Windows Forms, Wpf which are for Windows only. We want to write multiplatform UI as well.

    • Olia Gavrysh
      Olia Gavrysh

      We’ve discussed “why bringing WinForms and WPF to the cross-platform .NET Core” earlier and there are good answers for that question. WinForms and WPF will remain Windows-only because of the nature of these technologies but I’ll be curious to talk to you about multi-platform UI. If you’d like to share your scenarios for cross-platform desktop applications, please reach me out at oliag@microsoft.com or twitter: @oliagavrysh, that would be very helpful for us!

  • Avatar
    Andres

    Many thanks to all the team for maintaining Winforms!

    Any plans porting the Visual studio Tools For Office (VSTO) to .Net 5/7?
    We have some Excel VSTO add-ins in C#, some use Task Pane with Winforms controls. It would be great if this kind of development experience would also be possible in the “new .Net”.

    All the best!

    • Olia Gavrysh
      Olia Gavrysh

      Thanks for the feedback! Could you log this feature request via Visual Studio feedback channel (click on Send Feedback icon in Visual Studio top right corner -> Request a Feature)

  • Vasistan Shakkaravarthi
    Vasistan Shakkaravarthi

    Love the approach, had one question regarding this. Can this run on Linux as like .net core console application?

    • Olia Gavrysh
      Olia Gavrysh

      Thank you! WinForms and WPF will remain Windows-only because they have very strong dependencies on Windows APIs. By bringing them to .NET Core we enable many other benefits of .NET Core for desktop apps (as I mentioned here).

  • Marek Chramosil
    Marek Chramosil

    Is there any chance you could make the designer generate (in .Designer.cs) objects and their properties in alphabetical / or at least some deterministic order? It would greatly help with modern source controls – in both the size of commit changes and difficulty of merging. Thank you!

    PS: Same would be useful for .csproj files (even if less so now with the new .csproj format) and Linq2Sql DBML files.

    • Olia Gavrysh
      Olia Gavrysh

      That’s a great feedback. Could you log this feature request via Visual Studio feedback channel (click on Send Feedback icon in Visual Studio top right corner -> Request a Feature)

  • Érico P
    Érico P

    Mono had an incomplete port of Windows Forms, that ran on both Linux and MacOS. Any chance of giving multiplatform Windows Forms leveraging the previous work on Mono to .NET core? It would be amazing if .NET 5 came with this working!

  • Avatar
    Maytham Fahmi

    I have mean while used Blend, but thanks for sharing. One thing hurt me a lot why designer was skipped at all and come first late 🙁 that said thanks for sharing the extension 🙂

    • Olia Gavrysh
      Olia Gavrysh

      Thank you, Maytham! the reason why the Designer is behind the Runtime is that we had to do a lot of work to architect how the design surface will run and interact with Visual Studio from another process, while porting the Runtime to Core was pretty straight-forward. But stay tuned, we will be releasing updates on a regular basis! 🙂

  • Avatar
    johnny 7

    i love and understand what hard work you are doing. but without completely supporting VB.net is just a cripple guy. me among millions will not move to . net core even though we want to!. nobody is going to port vb.net projects to c# when is tens of thousands of lines of code. and the majority.of winform apps out there you show how alive and well they are and you decided to put winforms to core … are writen in vb.net. if you are going to do something do it until the end Microsoft!

    so you have 2 choice here.
    1)asap full vb.net support for CORE and .net 5
    2)get rid of the stupid {} and ; from C# for all those who prefer more logical and clean syntax!

    3)rename vb.net to B# (pronounce should sound “be Sharp”). 😎

      • Avatar
        johnny 7

        dear Olia, B# seriously will get rid of the old “mind set” that many still have that is the old “VB 6”, will make it more “trendy” and in the same concept and family of the C#, F#, we would have and B#.
        because “be sharp” is always > “just See sharp”

        and remember millions of students use VB.net in the world to start learning programming and not freak out by the {} ; and reverse syntax that other c++ style languages have! seriously that will boost it even more when added in .NET / CORE framework!

        so i hope you can convince the others and do the change… after all Microsoft had made a mess in the past with naming frameworks that was so damn confusing, and now whoever was responsible for the rebranding of all frameworks into .NET finally had some common sense! lets make B# happen (i have faith in you!)😁

        p.s Bill Gates created Microsoft thanks to Basic. lets not stop educating people. we need developers!😎😉

  • J}R{L Enterprise
    J}R{L Enterprise

    I installed the designer, created a new .NET Core Win Form project in preview version and still am getting the “System cannot find the specified file” error in the designer window. If I try reinstalling it says the extension is already installed.

    • Olia Gavrysh
      Olia Gavrysh

      Hm, that’s weird, could you report the issue via Visual Studio feedback channel (click on Send Feedback icon in Visual Studio top right corner -> Report a Problem) and we will take a look.

    • Olia Gavrysh
      Olia Gavrysh

      Thank you, appreciate your help!

      The designer is in the very early phase, this is the preview version and the very first one :), so there are bugs and not completed features. We still keep hearing that developers prefer us to give them the earliest bits to play with, but of course if you want a mature project, it’s better to wait till the GA version. Meanwhile thank you so much for finding issues and submitting feature requests! It helps up a lot!

      • Avatar
        Merrie McGaw

        Hi Maytham,

        We’re focusing hard on getting performance improvements into our next preview release. Stay tuned, this particular issue is already on our radar and being worked on as we speak.

  • Vincent Thorn
    Vincent Thorn

    Unfortunately, “Enable XAML Designer” trick DO NOT work. (I have 16.3.0 version though) I created empty WPF Core project and XAML designer show me only XML code, no visual of Window. Then I checked option – it was ON. Seems your team fails much deeper. I’ll upgrade till 16.3.1 and see what’s happen.
    UPD:
    Updated till 16.3.2 (already) – NOW WPF designer works. Seems developer switched off designer IN CODE, not in settings.

  • Avatar
    Robert Grubbs

    I’m very interested in how the out of process UI hosting works in Visual Studio. I work on a number of large composite applications, and I’ve always had a dream of hosting WinForms or WPF UI content from separate processes. We’ve wanted to do this so we can isolate components for stability reasons, as well as achieve a kind of multi-threading ability in UI technologies where thread affinity makes it impossible to build complex UI trees in background threads. It was also a possible solution for us to mix in 32-bit code into a 64-bit host application or vice versa (legacy ActiveX controls mostly).

    I played with the concept in WPF a long time ago, but it never worked very well. If there are changes to WinForms/WPF to support this in Visual Studio, I’d love be able to leverage them in our own applications! Thanks!

    • Avatar
      Merrie McGaw

      Alas, there weren’t really any runtime changes that went into WinForms to enable this easily. We’ve basically added a layer into our conceptual stack of windows within VS. This extra layer was created in the new .NET Core process and displays the form & controls that the dev has created. The next piece is making all the VS (.NET Framework) pieces talk with the design surface (that’s the Core layer) and interact properly. A lot of work is going in to make sure we’re enabling an experience as close to the single process .NET Framework based designer.

        • 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

  • Avatar
    Scott's hotmail account

    VS2019 16.3.8 + VSIX update installed
    Winforms Net Core

    The VSIX update doesn’t work, it makes no difference.

    WinForms Net Core – designer view, after the update posted on this page, remains unavailable.

    [EDIT] Correction, the design view does now appear

    • Avatar
      Merrie McGaw

      You can continue to use the classic Framework Designer by simply creating or opening a .NET Framework based application. If you were using workaround to get around the fact that the Core Designer isn’t ready yet, you may continue to use them.

  • John McCourt
    John McCourt

    Hold up. Something aint right here…. As a developer who recently moved from PHP to C# I find it quite funny that Microsoft is using WordPress (PHP) on their .NET blog. At least you guys are diversifying your technologies.

  • John McCourt
    John McCourt

    I’m oldskool, so I’d like to have a file menu for my winforms. Failing that I could maybe use a ribbon (cringe) for the top of the winform. I’d also like to be able to have a status bar at the bottom of my forms. I suppose it might be possible to compensate for the lack of a status bar by using a label. So far so good. Everything that’s there seems to be working as expected. I’m glad to be one of the early adopters of this development platform.

  • Avatar
    RICKY GAI

    Will C++ lanaguage be part of the .NET core Windows form development ?

    As Embarcadero C++ users already being very tired of waiting their slow C++ cross platform development for Android and MacOS 64 bits.

    If there is C++ for .NET core 3.0 Windows Form, 100000000000000000000% I will migrate and even if it is commercial version.

    I still prefers C++ the big brother instead of C#

    Please advise.

    Thanks.

  • Varadharaja Perumal
    Varadharaja Perumal

    Hi all,
    I had this problem earlier too (please refer my comment on Nov 11), but was able to resolve it after reading this blog – that is the issue of Forms designer not appearing.
    But, here again I the problem has rec-cured weirdly
    I am doing my application – created a simple forms with minimal forms design objects and concentrated on developing the code in c# and have been developing and testing the same for last couple of week lets say. No problem, but strangely now the same application refuses to open the forms design to let me modify the forms, though the forms opens up when i run the code – but that’s no use if i cannot redesign the form further to complete the application.
    I have also tried to create a new application – same happens – initially the forms appears, i create the minimal forms objects, and then i try to copy the original code into the new one and the forms designer just does not appear – strange really.
    Can some one please help and suggest how to get over the problem. I am stuck as it is a large amount of code and i have to test it out with all other form objects created too.
    thank you all for any help in this regard

  • Avatar
    Douglas, Joe

    If you want to have your time completely wasted then try it. I wasted an hour putting a simple windows forms application together using this designer for .net core and saved the results (or so I thought). When I reloaded the project later on, everything was gone – as if it never happens. So take my advice and use the designer for .net framework and forget about even trying .net core.

Leave a comment