Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can WPF applications be run in Linux or Mac with .Net Core 3?

Microsoft announced .NET Core 3 comes with WPF and Windows Forms. So can I create a desktop application for Linux or Mac using .NET Core 3?

like image 973
siyad Avatar asked Dec 28 '18 05:12

siyad


People also ask

Can .NET Core WPF run on Linux?

NET Core 3.0's support for WPF, a WPF application can run on Linux under Wine. Wine is a compatibility layer which allows Windows applications on Linux and other OSes, including . NET Core Windows applications.

Can WPF app run on Mac?

I know, WPF is only available in Windows and will be in future. But I liked the possibility to code and build my non-presentation projects in macOS and start it in my virtual machine (Parallels) using Windows 10. This isn't currently possible with the new version.

Are WPF applications cross-platform?

WPF draws its own controls and does not use built-in Win32 GUI components. The user interface is typically defined in XAML, an XML language. WPF even went cross-platform, in a sense, when Microsoft introduced Silverlight, cut-down WPF for embedding in web pages, and then later for Windows Phone.

For which platforms can WPF applications be compiled?

WPF runtime libraries are included with all versions of Microsoft Windows since Windows Vista and Windows Server 2008.


3 Answers

No, they have clearly stated that these are windows only. In one of the .NET Core 3.0 discussions, they have also clarified that they do not intend to make these features cross-platform in the future since the whole concept is derived from windows specific features. They talked about thinking of a whole new idea for cross-platform applications, which is not easy.

Source: https://youtu.be/HNLZQeu05BY

Update

The newly announced .NET 5 now aims in avoiding all this confusion by no longer calling it ".NET Core".

Update 2

With blazor client-side (releases on may, 2020), there is a new experimental project for cross-platform apps using webview that is in the works.

Source: https://blog.stevensanderson.com/2019/11/01/exploring-lighter-alternatives-to-electron-for-hosting-a-blazor-desktop-app/

like image 79
Neville Nazerane Avatar answered Oct 08 '22 16:10

Neville Nazerane


No with WPF or Winforms. But you still can develop desktop apps on Linux, with .NET Core, using other libs like GtkSharp or Avalonia

like image 24
Thiago Jedi Avatar answered Oct 08 '22 15:10

Thiago Jedi


Well, the name itself says Windows Presentation Foundation. So it's primarily windows based.

But it is worth to be noted that the new UI framework, .NET MAUI that will be shipped with .NET 6 is cross-platform, with a single-codebase, single-project structure.

Currently in Preview at the time of writing, to be shipped in November 2021. Here's the roadmap.

like image 5
Xpleria Avatar answered Oct 08 '22 16:10

Xpleria