WPF and WinForms Will Run on .NET Core 3

WPF and WinForms Will Run on .NET Core 3

If you haven't had a chance to explore the new capabilities of .NET Core 3, read along with an expert in the framework to discover what it brings to the table.

Maybe you already heard or read about the fact that Microsoft brought WinForms and WPF to .NET Core 3.0. Maybe you already saw the presentations on the Connect conference, or any other conference or recording when Scott Hanselman shows how to run a pretty old WPF application on .NET Core. I saw a demo where he ran BabySmash on .NET Core.

BTW: My oldest son really loved that BabySmash when he was a baby.

WPF and WinForms on .NET Core?

I was really wondering about this step, even because I wrote an article for a German .NET magazine some months before where I mentioned that Microsoft won’t build a UI Stack for .NET Core. There were some other UI stacks built by the community. The most popular is Avalonia.

But this step makes sense anyway. Since the .NET Standards move the API of .NET Core more to the same level of the .NET framework, making the APIs almost equal was simply a question of time. WPF and WinForms are based on .NET Libraries, so it should run on .NET Core.

Does This Mean it Runs on Linux and Mac?

Nope! Since WinForms and WPF uses Windows only technology in the background, it cannot run on Linux or Mac. It is really dependent on Windows. The sense of running it on .NET Core is performance and to be independent of any framework. .NET Core is optimized for performance so you can run super fast web applications in the cloud. .NET Core is also independent of the installed framework on the machine. Just deploy the runtime together with your application.

You are now able to run fast and self-contained Windows desktop applications. That’s awesome, isn’t it!?


Every time I install a new version of the .NET Core runtime I try dotnet new and I was positively shocked about what I saw this time:

You are now able to create a Windows Form or a WPF application using the .NET CLI. This is cool. And I for sure needed to try it out:

dotnet new -n WpfTest -o WpfTest dotnet new -n WpfTest -o WpfTest 

And yes, it is working as you can see here in Visual Studio Code:

And this is the WinForms project in VS Code

Running dotnet run on the WPF project:

And again on the WinForms GUI:


Visual Studio Code isn’t the right editor for this kind of project. If you know XAML pretty well, it will work, but WinForms definitely won’t work well. You need to write the designer code manually and there isn’t any designer support yet. Maybe there will be some in the future, but I’m not sure.

The best choice to work with WinForms and WPF on .NET Core is Visual Studio 2017 or newer.

Last Words

I don’t think I will now start to write desktop apps on .NET Core 3, because I’m a web guy. But it is a really nice option to build apps like this on .NET Core.

BTW: Even EF 6 will work in .NET Core 3, which means you also don’t need to rewrite the database access part of your desktop application.

As I wrote, you can now use this super fast framework and the option to create self-contained apps. I would suggest you try it out and play around with it. Do you have an older desktop application based on WPF or WinForms? I would be curious about whether you can run it on .NET Core 3. Tell me how easy it was to get it running on .NET Core 3.

Learn More

The Complete ASP.NET MVC 5 Course

Build a Real-world App with ASP.NET Core and Angular 2 (4+)

ASP NET Core (ASP.NET 5),MVC 6,C#,Angular2 & EF Crash Course

Rest Api’s in Asp.Net and C#

Hands on ASP .Net Core 2

Originally published by Juergen Gutsch at https://dzone.com

.net asp.net wpf forms

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Encrypt Password in Login Form with ASP.NET MVC and Identity framework

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, I will demo how to create Encrypt Password in Login Form with ASP.NET MVC and Entity Framework. Subscribe &...

Add asp.net Identity in empty project

LIKE | COMMENT | SHARE | SUBSCRIBE Today, in this tutorial you will see the process of adding an ASP.NET Identity to the ASP.NET Web Application developed in...

List all users from asp net core identity

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, i will show you How to retrieve and display all the registered application users in asp.net core using the ...

Extend IdentityUser in ASP NET Core

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorials, I will show you how to extend IdentityUser in asp.net core.. Subscribe & Stay Connected! Thank You! ♥ #...

Clear session in asp net core

LIKE | COMMENT | SHARE | SUBSCRIBE Today I will show you how to clear session data after logout from web application using asp.net core... Source code link :...