4 ms·
Is there a way to build a GUI app with .NET on Linux? Will it be cross-platform?
by pantalaimon 2y ago
Is there a way to build a GUI app with .NET on Linux?
Will it be cross-platform?
- sasakrsmanovic2 2y agoYes. https://platform.uno/uno-platform-for-linux/ https://platform.uno/uno-platform-for-linux/
- cultofmetatron 2y ago> Is there a way to build a GUI app with .NET on Linux? yes https://avaloniaui.net/ https://avaloniaui.net/
- deleted 2y ago[deleted]
- fsckboy 2y ago(i hardly know what i'm talking about so somebody else may have a better idea, but i'm here now so) mingw is a GNU's header/library environment (tools too maybe?) to create windows compatible applications. So I'd look into searching mingw .net and/or mingw mono. also, ask your favorite AI, they're good at this type of question so long as it's not up to the minute news
- aspeckt112 2y agoAvalonia. The UI isn't native, is a Skia canvass with drawn controls. But it'll work on basically every OS and it's pretty good. Also, you're not writing JavaScript, so that's a win any day in my book.
- mixmastamyk 2y agoSounds like Flutter?
- register 2y agoNo it's way better than Flutter. Avalonia really works on desktop.. :). Also the model is WPF so whoever know a little bit of legacy .NET framework will be able to write Avalonia apps in no-time
- mixmastamyk 2y agoI don't know any .net, and have never heard of this until now. Only stories with comments on HN are from eight years ago. Although I liked the screenshots on the linked site, it doesn't seem to have much buzz around it. And unfortunately, the only stench I can't stand more than Google's is Microsoft's.
- register 2y agoI do not follow buzz. I am an engineer by education and attitude and always try to investigate my options based on my needs and requirements. I use buzz only to drive me trough my investigations. In my case I had a desktop application that had to run on Windows and MacOs and needed support for Rich text format and rendering of custom graphs. Following buzz I started to do a prototype with Flutter and stopped after a few days as I found out that most of the open source controls I was using had bugs on Windows Desktop. Then I moved to MAUI and discovered that in order to have some decent Rich Text support my only option was Blazor Hybdrid. Nedless to say I found bugs that prevented my prototype to work correctly. Then I moved to UNO and found that it doesn't have full Rich text format support. I was able to find some .NET open source libraries for doing text layout on Skia and with that I was able to find a partial solution that was however pretty complicated. Out of curiosity I investigated Avalonia and found that everything that I needed had full support. Being fluent in WFP I built the prototype in 3 days and I never looked back. Your experience might vary depending on your fluency of WFP but I found that, considering Windows Desktop as a target platform, Flutter and MAUI are absolutely the worst options. In my opinion Uno is better than Avalonia when considering web application support but Avalonia has more coverage of the WPF api with respect to what Uno does for WinUi. And for sure marketing is the worst part of Avalonia while it is the BEST for MAUI and Flutter.
- SandyAndyPerth 2y agoThere was also a GTK package for Xamarin Forms which I've used https://github.com/xamarin/Xamarin.Forms/pkgs/nuget/Xamarin.Forms.Platform.GTK https://github.com/xamarin/Xamarin.Forms/pkgs/nuget/Xamarin.... BUT That's now officially unsupported as all of Xamarin Forms is no longer supported and the MAUI replacement doesn't cover Linux nor does that look likely (MAUI is mired deep in problems due over-ambition, failure to resource and it seems a significant push in MS to use MAUI Hybrid aka web UIs within native apps).
- pjmlp 2y agoI really don't get the push of Blazor everywhere instead of its original WebAssembly target. It is like the Web folks, that don't get anything else, are now pushing where .NET goes, mostly since .NET is now under Azure org chart. I have done Web and native since "forever", not everything has to be for everything.
- GoblinSlayer 2y agoYes, .net is for azure cloud webapps, that's how modern software is made. Then wrap them in electron to make them native.
- JoyrexJ9 2y agoI can't tell if this is sarcasm. I really hope it is
- FuriouslyAdrift 2y agoWebView2 would probably be the way to go, now... at least for Windows as the target. https://www.electronjs.org/blog/webview2/ https://www.electronjs.org/blog/webview2/
- pjmlp 2y agoEven the "port to WinUI" from UWP for the PhotosApp, is in similar vein, making use of Webview2 instead of native Windows. When Microsoft teams behave as such, why should we keep paying attention? For native Windows, Forms, WPF, and even MFC is way better in VS tooling than WinUI C++.
- giancarlostoro 2y agoThere's this: https://docs.tryphotino.io/Overview https://docs.tryphotino.io/Overview Which lets you run Blazor (web framework) like a desktop UI across all major desktop platforms. Microsoft has MAUI/Blazor as a thing, but only targets Mac and Windows ATM, so Photino bridges the gap for Linux. Photino lets you use anything other than just .NET but has pretty decent .NET support.
- zelcon 2y agoCreate an ASP.NET Core web server embedded in a binary bundled with Electron and a React frontend. (jk)
- Atotalnoob 2y agoThat is how electron.NET basically works
- zelcon 2y agoKind of suspected people might actually be doing that. “You may live to see man-made horrors beyond your comprehension.”
- Atotalnoob 2y agoTo be honest, if you use AOT you can get the .net component under 100mb with trimming so it isn’t that bad… If you cared about disk or memory usage you wouldn’t use electron, anyway.
- sbisson 2y agoYes. There are multiple UI projects that build on the WinUI 3 components in the Win App SDK. There's the first party MAUI which is an updated version of Xamarin Forms. The two best-known third-party implementations are AvaloniaUI and Uno. I prefer Uno, it has more cross-platform targets.
- megapoliss 2y agohttps://github.com/picoe/Eto https://github.com/picoe/Eto - OS X: MonoMac or net6.0- - Linux: GTK+ - Windows: Windows Forms (using GDI or Direct2D) or WPF Gtk - Gtk3: https://github.com/GtkSharp/GtkSharp - Gtk4: https://github.com/gircore/gir.core
- davidjade 2y agoThere is also Uno https://platform.uno/ https://platform.uno/