Can I Build Desktop Apps(WPF,WinForms) Using .Net Core

Can I Build Desktop Apps(WPF,Windows forms) Using .Net Core?

i know Console App Build Using Both .net core and .net framework. But When i develop Console app using .net core it will runs on(Win,Mac,Linux) is it true?

Upvotes: 13

Views: 12488

Answers (4)

dbones
dbones

Reputation: 4504

UPDATED for .NET 6

.NET 6 will support MAUI, WPF and Winforms for UI.

this means we have at least 3 solutions for a cross-platform UI

ElectronJs still looks like a solid way to support all main OS's (iOS, Linux and Windows)

.NET 6 - all platforms

Original Answer

.NET CORE 3 will support windows (WPF, winforms) development, only on windows, note at this time its not released yet (at the time of posting).

Mono + Gtk# should support Linux, Mac and Windows.

Windows only

either way, if you really want to write cross platform windows, consider exposing a Web Api and write windows client using electronjs

Upvotes: 11

Juergen Gutsch
Juergen Gutsch

Reputation: 1764

Yes, .NET Core apps are able to run on Mac and Linux as well. Depending on used OS specific APIs. Because of Xamarin, Microsoft probably will not provide a UI technology for .NET Core.

Fortunately the community creates some: You should definitely have a look into Avalonia, written by Steven Kirk: https://github.com/AvaloniaUI/Avalonia

EDIT Dec. 06th 2018:
Actually Microsoft will support WPF and WinForms upon .NET Core 3.0 on Windows. I didn't know about that back in Dec. 2017 :-)

EDIT Mar. 18th 2019
https://asp.net-hacker.rocks/2019/02/11/dotnetcore3.html

Upvotes: 9

Koder101
Koder101

Reputation: 892

Can I Build Desktop Apps(WPF,Windows forms) Using .Net Core?

Yes, Winforms and WPF applications can be built in upcoming Dotnet Core 3.0

Check this blog article. You can also run the Portability analyser in advance.

Update April 17th 2019:

Now we can start using the DotNet Core 3.0 Preview 2 on Visual Studio 2019.

Some of the key features relevant to Desktop app -

  • C# 8

  • Default executables

  • Windows desktop applications using WPF and Windows Forms

  • MSIX Deployment for Windows Desktop

  • Windows Native Interop

See here for porting a desktop application to Dotnet Core 3.0

Upvotes: 3

Maxim Saplin
Maxim Saplin

Reputation: 4652

JIC, it's possible to build desktop apps using Mono/Xamarin. Here's an example of Xamarin.Forms app targeting Xamarin.Mac (macOS) and Xamarin.WPF(Windows) + Android.

https://github.com/maxim-saplin/CrossPlatformDiskTest

At the moment it seems like Xamarin.Forms is the easiest way to start building GUI apps for non-Windows platforms using XAML and C#/.NET. Besides Android/iOS, there's a variety of desktop platforms supported: macOS (via Xamarin.Mac, GTK), Windows (via WPF, UWP, GTK), Linux (via GTK).

Upvotes: 0

Related Questions