Developing Windows Forms Applications in Rider 2019.1

With Rider 2019.1 EAP (and the stable release coming very soon!), we deliver another major feature right to your front door. With nearly 300 votes, the Windows Forms Designer was one of the highest voted features that got implemented for this release. Since the designer relies on and integrates with Windows-specific components, it’s available only on Windows systems. We’re excited to tell you more about how it works, so let’s open up a Windows Forms project and dive right in!

Using the Windows Forms Designer

After opening (or creating) a Windows Forms project, we can open a form in the editor. This will show us the actual Designer View that displays the form or user control (1) we’re working with. From the Property Grid on the left-hand side (2), we can manipulate available properties like Text, Items, and Fonts, and we can also subscribe to events for double-clicks, mouse hovers and so on. On the right-hand side, the Designer Toolbox provides a list of components that can be added to the form (4). At the bottom, we can find navigation tabs to switch between the designer view and the code behind (3):

Designing Windows Forms

Besides framework controls, we can also add our own controls to the Designer Toolbox. After clicking on the Assembly List Configuration (1), we will find a dialog to browse for assemblies containing the controls (2). The selected controls are then listed in the Designer Toolbox list view as well (3):

Adding new controls to the toolbox

Creating related projects and files

Rider also ships with project and file templates related to Windows Forms development. When creating a new project, we can now also select the new Desktop Application project template, which further allows to select between UWP, Windows Forms, and WPF as the UI technology:

Project template for Windows Forms

When adding a new file, the list of templates will include the Windows Form, User Control and Component file template:

File templates for Windows Forms

Note that these templates will only appear in projects that have a reference added to System.Windows.Forms.

Error Handling when Forms are Broken

Things do not always go perfect, and if we have to manually edit our designer files, we might break our code. When loading a broken form, Rider will jump to the designer code and highlight the parts that couldn’t be parsed:

Error reporting for Windows Forms

One question that remains: does Rider support Windows Forms for .NET Core 3.0 preview? Not yet. We do have a tracking issue which you can subscribe to and/or add comments.

We hope this will make a lot of developers happier. As always, please don’t hesitate to give us some feedback! Is there anything we can further improve? Download Rider 2019.1 EAP now and let us know your thoughts!

Comments below can no longer be edited.

25 Responses to Developing Windows Forms Applications in Rider 2019.1

  1. Avatar

    tony says:

    April 29, 2019

    Will it work with third party controls? (ie, devexpress?)

  2. Avatar

    Jose Claros says:

    April 30, 2019

    Please add Winforms desginer support for Linux.

    • Avatar

      Matthias Koch says:

      May 2, 2019

      Hi, WinForms is a Windows-specific technology, so currently no plans for a designer on Linux/Mac.

      • Avatar

        SpiceyWolf says:

        June 21, 2019

        As far as mono framework is concerned most winforms things will run fine on linux and mac… not 100% of it or all custom control techniques that would require hacky winAPI stuff sure… but the majority of stuff people would need could be done in it so I cant see a good reason why it shouldnt be done D:

        • Avatar

          Matthias Koch says:

          October 28, 2019

          Sorry that was a bit unspecific. Rider uses the existing WinForms designer available for Windows, which is not compatible with other systems as is.

      • Avatar

        Steff says:

        October 24, 2019

        Could you describe what that ‘Windows specific’ part about WinForms is? Because Mono has been able to run that stuff on Linux for years.

        • Avatar

          Matthias Koch says:

          October 28, 2019

          Sorry that was a bit unspecific. Rider uses the existing WinForms designer available for Windows, which is not compatible with other systems as is.

      • Avatar

        eri0o says:

        October 27, 2019

        Please consider adding Winforms support for Mac!

  3. Avatar

    Natalia Portillo says:

    May 1, 2019

    Does it mean other frameworks can provide their designers as plugins made in C#?


    • Avatar

      Matthias Koch says:

      May 2, 2019

      In principle, many things can be achieved via plugins. However, this blog post doesn’t support that idea in particular. Can you elaborate maybe? You can also mention me in the GitHub issue if that helps (@matkoch).

  4. Avatar

    Taha Guler says:

    May 22, 2019

    Is it possible to publish a Windows Form applications to an FTP server?

  5. Avatar

    Vasili says:

    May 26, 2019

    Does it have TabControl component?

    • Avatar

      Matthias Koch says:

      May 27, 2019

      It seems this was not added to the default list. We will fix this for 2019.1.2, which should be out in a few days. Thanks!

  6. Avatar

    Mateusz says:

    June 25, 2019

    thank you for the Designer, this is great tool to have and is definitely making easier to decide to buy whole products bundle instead of some product + other famous IDE.

    However, one thing that I’m missing most at the moment is some easy and intuitive ability to access controls that are hidden by others, for example because of fill dock style.
    I think greatest solution, also for general experience when working with forms design, would be to implement some tree-like view in the structure window when in designer mode (as for now, structure window is empty in designer mode). For example main node will be a form or other base control, then children will be all controls attached to it etc. Some sorting possibilities that should be selectable:
    * by individual name
    * offset from top relative to parent, then offset from left
    * offset from left relative to parent, then offset from top
    * by control type
    Also in such tree could be provided some ohter properties of the control, and action handlers, so for example one could navigate through the form structure using this tree and then jump to the code of the function that is implementing some handler (maybe each node in the tree will contain some main virtual sub-nodes: “Children” and “Properties” etc, maybe “Children”, “Properties”, “Handlers”, etc.). Btw, I’m still missing Ctrl+F12 behavior like in PhpStorm, then the whole feature could be presented also there. Some quick, scaled down visual preview in floating window on mouse over tree element would be a nice bonus.

  7. Avatar

    Loser says:

    August 10, 2019

    ListView is not found in the Designer Toolbox.

    Also, the Designer Toolbox needs to be auto-hided when switched to code editor, as it serves no purpose for the code editor.

  8. Avatar

    obe says:

    October 6, 2019

    is there a keyboard shortcut for switching between the Designer and the code? I searched for “designer” in the Settings’ Keymap and nothing relevant came up…

    • Avatar

      Matthias Koch says:

      October 7, 2019

      Hey, the action should be called Select Next Tab in multi-editor file.

  9. Avatar

    Gabre Francis says:

    October 20, 2019

    Well, if this does not work i linux, why would i opt for jetbrains over visual studio

    • Avatar

      Matthias Koch says:

      October 28, 2019

      There is no Visual Studio for Linux, so I don’t really follow the question?

  10. Avatar

    Dmitry says:

    November 6, 2019

    Great feature, but almost unusable in many cases without a `Navigator` or `Tree view` or some other hierarchical representation of the components in the form. There are hidden components and components that are pretty hard to select (e.g. SplitContainer)

  11. Avatar

    soikot says:

    April 18, 2020

    How can I deploy or publish this application and make an Installer file???

  12. Avatar

    Md. Akter Hossain says:

    May 14, 2020

    I’m using Rider version 2020.1 in my workstation.
    My issues are, when I create any WinForms/WPS/UWP application and then build, it’s showing bellow errors:
    (A) Microsoft.Common.CurrentVersion.targets(3032, 5): [MSB4216] Could not run the “GenerateResource” task because MSBuild could not create or connect to a task host with runtime “CLR4” and architecture “x86”. Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable “C:\Program Files\JetBrains\JetBrains Rider 2020.1.0\tools\MSBuild\Current\Bin\MSBuild.exe” exists and can be run.

    (B) Microsoft.Common.CurrentVersion.targets(3054, 7): [MSB4028] The “GenerateResource” task’s outputs could not be retrieved from the “FilesWritten” parameter. Object does not match target type.

    Also, its not showing any Components on Designer Toolbox. Moreover, when I try to Open Designer of a User Control, its tell “designer is outdated”

  13. Avatar

    Jared says:

    June 5, 2020

    We have old windows forms projects, does this work with or ONLY c#?

Discover more