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

4

86

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?

Unmanly answered 28/12, 2018 at 5:28 Comment(2)
According to their changes they claim to have added executeables for the .net core packages, so it looks like you might be able to run Desktop apps on Linux, but just like any new technology I will take it with a grain of salt at this point as it's only in it's beta stages.Week
No, but something similar is in development tho not MS github.com/AvaloniaUI/AvaloniaPreselector
S
60

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/

Sensibility answered 28/12, 2018 at 7:10 Comment(4)
This is highly confusing, as dotnet core meant to be cross platform, isn't it? What is it worth going that route if it becomes platform dependant again? Also in relation to the competition (Java-Land). Any thoughts? :-)Dissipated
@Dissipated at first for the same reason I was thinking WPF is becoming cross-platform. However, while .NET Core started out as primarily a cross-platform concept, right now since it is a reinvention, it is also far cleaner to develop than Framework. This approach doesn't really take .NET Core into that route. Just something that was windows dependent is now "cleaner windows dependent". They are still working towards the cross-platform desktop. will take time but still a cross-platform direction.Sensibility
.NET Core is still cross platform, but Windows Desktop support isn't part of .NET Core, it's considered an add-on SDK that uses .NET Core. I imagine sooner or later someone will fork it and start working on cross-platform, the demand is huge and solo efforts like Avalonia just don't have the manpower (I read somewhere that the original WPF effort involved nearly 1000 full-time devs).Richart
@Richart yes. Support for Windows desktop will be added as a set of "Windows Desktop Packs".It contains UWP, WPF and Windows forms. Which will only work on Windows. linkUnmanly
O
24

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

Owings answered 7/4, 2019 at 0:25 Comment(4)
this actually seems to use standard not core. But they are arguably the same. Some other similar options would be the extensions of blazorSensibility
Very interesting, I didn't know. But Avalonia is a Visual Studio Extension and Visual Studio can't be installed on Linux, can it?San
Only the visual designer is in the vs extension. You can write the code in any editor / IDE you like.Owings
Cool, yes I've just installed Avalonia on Linux Fedora. I'm running fine the first MVVM app as per the standard template.San
M
6

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.

Matsu answered 19/3, 2021 at 11:4 Comment(0)
M
2

Although it is not native dotnet core on linux, but it may be helpful - using wine.

I find a very useful comment in the discussion here, more details here

In other words, it is possible to use windows version of dotnet core under wine.

I didn't try it yet, but from the article I mentioned I can say it looks nice and might be an option.

Munafo answered 22/5, 2020 at 19:17 Comment(1)
As far as I see, if you use Wine, you are even not limited to .NET Core, you can use .NET Framework applications as well: appdb.winehq.org/…Wit

© 2022 - 2024 — McMap. All rights reserved.