question

SAbijith-9493 avatar image
0 Votes"
SAbijith-9493 asked SAbijith-9493 commented

Run Windows application on Linux server

Hi All,
We have a Winforms application with a very minimum UI. We are currently using .Net Framework 4.5. We need to run this application on a Linux machine. We are currently considering migrating the .Net Framework to .Net Core.

Please let us know if there any other better approach to achieve this task or if we can continue with .Net Core.

Any help would be appreciated. Thank you!!



windows-formsdotnet-runtime-frameworkdotnet-runtime-core
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If you're considering making it a console application, .NET Core should be fine.

1 Vote 1 ·
SAbijith-9493 avatar image SAbijith-9493 DavidLowndes-6766 ·

Sorry for the late response.
Yes, it will be a console application and as per suggestion, we will go ahead with .Net Core.

Thank you for your response!!

0 Votes 0 ·
SAbijith-9493 avatar image SAbijith-9493 DavidLowndes-6766 ·

Hello All,
As we are considering using .Net Core, can anyone suggest which version of .Net Core would be better.

Is it better to use .Net Core 3.1 or .Net Core 5.0?? Can anyone please let us know on this.

Thank you in advance!!

0 Votes 0 ·
cheong00 avatar image
1 Vote"
cheong00 answered Roflush-4104 commented

.NET 5 introduce limited support for WinForm, so you may give it a try.

You're strongly advised to review what is not supported and replace them with alternatives before start conversion.


· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Although .NET 5 supports WinForms, it's only on Windows AFAIK.

0 Votes 0 ·

.NET 5 WinForms is Windows only I believe.

0 Votes 0 ·
cheong00 avatar image cheong00 DavidLowndes-6766 ·

Oh, you're right. Apologies for the mistake.

In that case, to use GUI on Linux you'll need some cross platform libraries like Xamarin.

Note that the GTK# that it based on is still on preview.


0 Votes 0 ·

I don't believe Xamarin does Linux GUI - though I might be wrong.

0 Votes 0 ·
Show more comments

Just use Avalonia


0 Votes 0 ·
AlejandroCastrejon-0229 avatar image
1 Vote"
AlejandroCastrejon-0229 answered cheong00 commented

Why don't install Mono runtime on linux to run your .net winforms application ?

I did it to run a winform application on raspberry (Debian)




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Agreed. You can just continue to code for .NET Framework 4.X and ignore about .NET Core/.NET 5 for now.

I've written a few .NET v1.1 application that runs on Linux with Mono 10+ years ago and it needs very little changes to work. (The changes I needed to make are mostly due to filesystem permission difference)

1 Vote 1 ·
Roflush-4104 avatar image
1 Vote"
Roflush-4104 answered cheong00 commented

If you are running an app in Linux it will be fine .net framework is cross-comp is great for running them.
You just have to download Mono or the .net run time to run apps. (WPF apps use Microsoft's DX to render the app, so you can't use that app on Linux or Mac)


Developing them however is a wildly hard idea. Winforms is sadly outdated, while MS is trying to update it, the legacy code really bad. You should look into migrating to
Avalonia UI. It's an Open Source, Cross-platform UI library like WinForms (that is an understatement). If you want to stay on WinForms however Mono supports in runtime and SDK. proof of concept for WinForms running in Linux using Mono


Really Avalonia replaces both WPF and WinForms.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Not knew this framework before. Sounds interesting and will definitely take a look.

0 Votes 0 ·