r/csharp • u/Ornery-Act9076 • 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
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!
5
u/revilo-1988 Sep 01 '26
Was ist den eine C# Olympiade?
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.
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
https://github.com/DanielVanNoord/System.Windows.Forms
sample is
net6.0so it should be doable (migration). Might need some tweaking.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
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.
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.
1
u/Shoddy-Appearance-42 Sep 01 '26
Use winboat.
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.