7 ms·
How well are F# and C# supported on the Linux platform?
by BenGosub 4y ago
How well are F# and C# supported on the Linux platform?
- rqtwteye 4y agoWe have been running .NET Core C# on Linux servers for quite a while now. Works great.
- kcb 4y agoFirst class. I would wager that most new .NET projects are primarily targetting Linux for deployment.
- viraptor 4y ago* for serverside
- kcb 4y agoYea I'm guessing there's not a ton of fresh WPF or forms desktop apps being created. We've mostly moved to ASP.Net backends with React frontends wherever possible.
- viraptor 4y agoOh, there's definitely a huge amount of wpf and winforms created every day. That's what I meant. Those people just don't visit HN that often. (Then again, I created 4 windows specific wpf apps last year...)
- jameshart 4y agoUnity3D is probably one of the most widely used cross platform native app development platforms, and it’s taking c# .net code to Linux, macOS, android, iOS and browsers via wasm.
- mythz 4y agoThis doesn't speak to the cross-platform .NET Core runtime as Unity3D is built with C++ and still uses their modified fork of Mono to run C# code whilst their WASM uses their IL2CPP tool to convert .NET byte code to C++ before using Emscripten to convert to WASM.
- capableweb 4y agoBesides battling Visual Studio, `dotnet` cli and C# as a language, deploying a binary built on Windows to Linux was a breeze. If you're more used to the development environment, I bet it'd even be pleasant.
- pjmlp 4y agoNot really, plenty of VS tooling doesn't exist on VS4Mac nor VSCode. GUI frameworks don't consider Linux a deployment target, not even MAUI with its Xamarin heritage. Due to its Windows original focus, lots of libraries still rely on Win32, COM and other Windows specific issues. This also inhibits most big name CMSs, which still rely on .NET Framework, e.g. Sitecore, SharePoint, Dynamics,.... Targeting Linux containers is usually only done by us if writing greefield microservices without many dependencies outside the standard library.
- foepys 4y agoStop wasting time with VSCode when doing professional development on .NET and use Rider on Linux and Mac. The C# addon for VSCode is lacking so many features compared to VS and Rider that it's mostly a toy. The Rider licensing cost is negligible when compared to a developer's compensation.
- pjmlp 4y agoI don't waste time, we mostly target Windows with .NET, for UNIX workloads we usually use node and Java, as you can see by my last sentence there is very little .NET/UNIX for us, and even so, it is developed on Windows deployed on Linux. No need to pay for Rider licenses on top of the VS ones we already have.
- pleb_nz 4y agoNot quite true, people can choose to use other tools that do work well cross platform e.g. Rider. VS and VSC agent the only ponies in town. I don't even use VS on subdued installs anymore, it's no longer the better option.
- jjtheblunt 4y agoI use both on Linux (and Windows, and MacOS) and they're excellent. Some libraries thought of as C# are bindings to Windows OS things, so those are platform specific. You've really got to read the Microsoft Learn pages to get higher resolution for an answer, though.
- jchw 4y agoC# support should be pretty good. You've got options. You can use the Mono ecosystem, including the MonoDevelop IDE, Mono runtime, and libraries like GtkSharp; these have been around for a while and some Linux desktop apps use it. You can also use the official Dotnet SDK and runtime, which lacks some stuff that Mono has for compatibility (like Winforms) but should have a good developer experience in either VSCode or Jetbrains Rider, and supports the latest .NET and C# features. I don't know much about F#, but it seems F# isn't far behind. There's a useful page about getting started and other than the omission of Mono it is similarly supported. https://fsharp.org/use/linux/ https://fsharp.org/use/linux/
- bmitc 4y agoF# comes with the .NET SDK. Once you install it, you get F#, so F# isn't behind at all. Mono is largely irrelevant except for legacy applications things like Godot and Unity that use Mono.
- jchw 4y agoOn Linux, I don't think Mono is irrelevant. It would not be abnormal to have both upstream dotnet and Mono on the same machine for desktop Linux.
- mattmanser 4y agoThis seems like completely out-of-touch info. You can run C# with .Net Core on linux now easily, no Mono involved and have been able to for years. TBH, I thought Mono was dead. If it's not it's an extremely niche thing of people who want to write desktop apps for linux in C#, a tiny slice of the market. I've run production ASP.Net core apps on linux (basically websites in C#), trivial to setup, even though I develop on Windows.
- bmitc 4y agoGreat. Just install the .NET SDK, and you get both languages. You can start an F# REPL immediately after installing with `dotnet fsi`.
- LAC-Tech 4y agoI remember that being missing for years. Nice.
- bmitc 4y agoThe transition from .NET Framework to .NET Core and then to .NET 5+ was rough on F#, but it's been a net positive in the end. The .NET SDK and thus F# is one of the easiest things to install on nearly machine.
- foobarbaz33 4y ago> to .NET Core and then to .NET 5+ Just to nitpick. Core -> 5+ was not really a transition. Just a rename to drop the word "Core". Core is still itself, still Core, just no longer called Core. The old .NET is frozen at version 4.8. So Microsoft felt there was no longer a need to refer to Core as "Core" once it hit version 5+. Maybe a bit premature as the old .NET is still in heavy use. Now it's always unclear which .NET someone is talking about because they say ".NET" which may refer to the old .NET or maybe the new .NET formerly known as "Core".
- Kwpolska 4y agoThey went from .NET Core 3.1 to .NET 5 and a yearly release cadence. The idea with .NET 5+ was also to unify the platform with support for building Windows desktop apps (WinForms/WPF) and mobile apps (Xamarin/MAUI).
- mythz 4y ago.NET 5+ (fka .NET Core) is cross-platform. We've been developing on Windows and have been deploying exclusively to Linux since 2017, everything runs flawlessly. Only time where the deployed version was different was when the locale wasn't set in a Docker container. Developing on macOS has an issue with running HTTPS/2 and gRPC endpoints which should be resolved in .NET 8 [1]. The notable part where .NET Core is lacking vs legacy Windows .NET Framework is graphics, i.e. System.Drawing and all Desktop GUIs, otherwise it's a first class cross-platform runtime. [1] https://github.com/dotnet/runtime/issues/27727 https://github.com/dotnet/runtime/issues/27727
- xupybd 4y agoWe are running NopCommerce (https://nopcommerce.com/ https://nopcommerce.com/) on Linux with no problems. This is ASP on .Net Core and everything works well. I have a handful of smaller programs built on the SAFE stack. They're all F# and run very well on Linux. We use a lot of Excel interop so that is a no go on Linux but that is the only limitation I've found. It's not hard to have a server with an Office 365 license to run all of our Excel processing.
- acedTrex 4y agoI exclusively do C# dev on macos for what thats worth
- ihateolives 4y agoWith Rider or VS Code on Mac? I've been wanting to play around with C# but I already have Intellij Idea Ultimate subscription and I'm hesitant to add another one. I'm wondering how good of an experience would VSC be for C#.
- Clubber 4y agoI've used VSC as a professional for 4 or 5 years now and love it. I prefer it over Visual Studio because the latter is so feature bloated. I'm currently using and M1 Mac to develop on and it works fine. Once you learn the shortcuts, you'll be zooming around. Azure Data Studio is on its way to being a nice cross platform environment for databases, but it's not fully cooked yet. It was progressing really well but the last few months, it's been really slow to start the execution of any query for some reason. Hopefully they will fix that soon. Both environments are plug-in based and there are a lot of good free ones available. You should definitely check it out.
- zamalek 4y agoAt work our C# codebase never touches Windows (all developers except me use MacOS, I am testing Linux). Production is Linux. We all use Rider, which pretty good (but extremely crashy when debugging). Probably in the region of 500Kloc.
- blevin 4y agoWhat sort of system is it? Linux is reportedly around 30Mloc, Chrome around 5Mloc.
- zamalek 4y agoMy bad, I corrected the unit.
- andsoitis 4y agocurious: what led the company to choose the CLR/C# over the JVM/Java?
- zamalek 4y agoI wasn't around when the decision was made. However, we moved from Ruby to .Net. I'm not sure if Java was ever even a consideration.
- kevingadd 4y agoMy day job is to work on the .NET runtime and I do 99% of my development in a debian VM (remoting in with VS code as my text editor). I can't remember the last time I hit a platform specific roadblock or needed Windows to do something.
- pleb_nz 4y agoI do so my .net dev on macOS and Linux including backend, front end and xam mobile dev. No issues. Rider is your friend.