3

I have a C# WPF program that I’ve been working on for a while now and I need to move to Linux. I know that Moonlight is dead and Monodevelop has no future plans of implementing WPF functionality. Does anyone have any advice for the most painless way to rebuild my program in Linux? It’s a DnD character generator that uses a GUI with tab controls to separate the different parts. I only know C# but I’d learn another language if it was the best way.

Jeff Godzilla
  • 119
  • 1
  • 2
  • 6
  • I think you can run Silverlight on Linux. I gather mono might still be an option. I'm not at all sure about how practical that option would be http://walking-in-moonlight.blogspot.co.uk/2011/05/run-wpf-applications-on-linux.html If you have no web server then maybe a re write in java. Depends how much code and markup you have really. – Andy Mar 30 '18 at 12:31
  • 1
    [Avalonia](https://github.com/AvaloniaUI/Avalonia) may be your best bet. Try it. – aloisdg Mar 30 '18 at 15:27
  • This was closed as off-topic, but its really a duplicate of https://stackoverflow.com/questions/2962874/what-are-the-open-source-alternatives-to-wpf-xaml/3023868 – Federico Berasategui Mar 30 '18 at 18:16

1 Answers1

1

The .NET Framework was planned for Platform independant, but that never realised. It grew too big to fully port.

.NET Core does not have that issue. It was cut down compared to the .NET Framework. It supports neither WPF nor Windows Forms, but it does support something similar: UWP. Wich is basically "WPF with App environment added". Since your programm propably needs no extensvie rights, UWP might be the way to go.

Edit: With .NET Core 3.0, thie Windows Forms Support will be added again. .NET Framework targetting WinForms Programms will need a conversion, but if you start from scratch it should just work.

Otherwise the common GUI to do cross platform anything is Xamarian. But Xamarian Apps are usually designed from the get go as such.

Christopher
  • 9,634
  • 2
  • 17
  • 31
  • 3
    I didn't think uwp or xamarin works on Linux. – Andy Mar 30 '18 at 12:34
  • 1
    UWP will not work on linux. – FCin Mar 30 '18 at 12:40
  • @Andy: Considering Xamarin comes from Mono and was designed to run be cross platform, I wonder how it could not work: https://www.xamarin.com/ It comes down to a question of at least "how much UI do you have to rework". And htere is a minor chance that some backend code (Random Number Generators, some odder Classes) have to be changed due to inconsistencies between the .NET Implementations (Framework, Mono, Core). While .NET has seen some improovements in Cross Platform with .NET Core, it is still a tricky area. – Christopher Mar 30 '18 at 12:53
  • Wouldn't that be limited to monodevelop though? I thought that was obsolete. I may well be mistaken – Andy Mar 30 '18 at 13:02
  • @Andy: I am honestly not 100% sure myself. I do know we have a .NET Core Implementation for Linux from Microsoft itself: https://learn.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x I kind of asumed that UWP would be part of it too. it was basically either UWP/.NET Core. Or Xamarin/Mono. The Framework will have to give away from .NET Framework either way. It is just a mater of how close the new Framework will be to the old one. – Christopher Mar 30 '18 at 13:16
  • "The .NET Framework was planned for Platform independant, but that never realised. It grew too big to fully port." Who cares? Why do you have to copy paste that useless comment in every single answer? The only actual answer for this question is: there's no official framework for development of Linux desktop applications. Xamarin doesn't have a Linux build – Camilo Terevinto Mar 30 '18 at 14:07
  • 1
    @CamiloTerevinto: "Who cares? Why do you have to copy paste that useless comment in every single answer?" I do not copy and paste. I write it. Every. Single. Time. And it maters for the person asking, because he wants to know how easy Cross-Platform actually is in .NET. I thought preparing a person for the bad news is a good idea. – Christopher Mar 30 '18 at 14:47