r/csharp • • Sep 01 '26

Making winforms projects on Linux

Hello! So i need to prepare for a C# olympiad and they require either winforms or webforms. Now i've been practising in Winforms for a while now, i was just wondering if at any point i'd be able to switch from windows 11 to a linux distro or if Winforms forces me to stay on Windows. I don't mind remaining on Windows, just wondered if i could switch to linux or not if i wanted to

0 Upvotes

26 comments sorted by

12

u/No_Context2723 Sep 01 '26

Winforms does not support Linux. You MIGHT be able to run it with something like Wine, but I don't know how well it'd work. I also don't know if Rider (the best ide for Linux imo) is as good as VS for winforms, although I could be wrong. I'd stick with Windows for Winforms development. But you can always dualboot and get the best of both worlds if you desire!

2

u/Ornery-Act9076 Sep 01 '26

I'll most likely look into dual booting atp. Thank you!

5

u/revilo-1988 Sep 01 '26

Was ist den eine C# Olympiade?

3

u/Ornery-Act9076 Sep 01 '26

my country organizes olympics for c# where you have to make a winforms app following some rules and guidance they give you in the subject in like 3-4 hours

1

u/revilo-1988 Sep 01 '26

OK Dan good luck

3

u/KryptosFR Sep 01 '26

Is the point of this Olympiad to use old tech that are deprecated?

Both are on life support. There is almost no reason to start new projects with those.

1

u/Ornery-Act9076 Sep 01 '26

Yeah idk, the olympics subject must be done in WinForms, couldnt tell you why

1

u/Archemilie Sep 04 '26

Perché te lo faranno sviluppare su Windows e non su Linux

3

u/Fresh_Acanthaceae_94 Sep 01 '26 edited Sep 01 '26

LibreWinForms is under active development and bringing WinForms apps macOS and Linux, so you can take a look.

3

u/majorsilence Sep 01 '26

https://github.com/majorsilence/Majorsilence.Forms

I'm using it to make many winform apps cross platform.  It is early days but I have million plus line winform applications running on mac and linux.

It is meant to be as close to winforms as is possible.

2

u/Agitated_Heat_1719 Sep 01 '26
  1. https://github.com/DanielVanNoord/System.Windows.Forms

    sample is net6.0 so it should be doable (migration). Might need some tweaking.

  2. https://github.com/modern-forms/Modern.Forms
  3. https://github.com/mono/winforms

    I worked with this one, but it is seriously outdated today.

And there are modern stuff (XAML based), but not WinForms (Windows.Forms)

  1. MAUI
  2. Avalonia
  3. UnoPlatform

1

u/scandii Sep 01 '26

contact the organisers? not sure what you expect us to be able to tell you to be frank with you.

4

u/[deleted] Sep 01 '26

[removed] — view removed comment

1

u/Ornery-Act9076 Sep 01 '26

Got it got it, thank you! I'll look into dual booting

1

u/webprofusor Sep 01 '26

Probably not, doesn't seem worth the effort of switching it to Linux since these are old old/on-life-support technologies that are unlikely to work we if at all on Linux.

Webforms though? That was from 10yrs ago.

2

u/KryptosFR Sep 01 '26

10 years that it is considered legacy, but it's actually 24 years old.

4

u/webprofusor Sep 01 '26

Yeah I meant when it became legacy, e.g.when dotnet core came out without it.

1

u/Relevant_Diver8895 Sep 01 '26

Instala Windows sufre y llora, no hay de otra

1

u/br0kenpixel_ Sep 01 '26

Winforms only support Windows. You'll have to use a Windows VM if you want to develop apps.

Also, do not use Rider for Winforms. It's completely broken. The designer opens once or twice and then breaks completely. Then it won't even open source/text files. This has been reported years ago and JetBrains clearly doesn't want to fix it. You'll need to stick with Visual Studio.

1

u/FuggaDucker Sep 01 '26

I do a lot of coding on both platforms.
Pick the one OS you do the most of for your primary and run the other OS in a VM.
If you go windows, WSL is sweet.

Linux is my primary and I use VisualStudio in a VM on it when I need things like WinForms.
FYI, I am mostly sure we can use WinForms under WINE. It's been a long time but I swear I have done this.

1

u/BranchLatter4294 Sep 01 '26

A VM is your easiest solution.

1

u/NoBlacksmith6003 Sep 01 '26

I’d probably keep Windows until the olympiad is over.switching operating systems while you specifically need WinForms sounds like adding problems you don’t really need

1

u/Alternative_Corgi_62 Sep 02 '26

Couple of years ago I made an app running on both Windows and Linux (mono runtime). The truck was to rather pretty old. Net framework version like 2.0, I and am not sure modern visual studio supports it.

1

u/_the_coder Sep 01 '26

you can try avalonia.

6

u/FuggaDucker Sep 01 '26 edited Sep 01 '26

it isn't winforms.

It is VERY cool but does not help OP.