As the title says, you probably guessed it already. For work I mainly develop on the .NET platform using a Windows device, but at home I enjoy all the benefits of a good OS.

Now I kinda want to get my C# skills “sharper” and have some projects in mind utilising it, but I’m a bit miffed about the development tools and possibilities of deployment available for me on Linux.

Also I may want to coerce my boss to let me work on a device with my OS of choice.

Any advice from devs that are in a similar spot? What do you use for .NET development on Linux? And are there any cool multiplatform deployment possibilities (next to Xamarin/Maui) that actually let me build natively on Linux?

  • I do all my editing in neovim, with omnisharp as an lsp. It works pretty well. Happy to send you my dotfiles if you want.

    As far as deployment, dotnet just runs on Linux now, especially if you’re do8ng web, its all the same. I deploy through containers to kubernetes, and its super smooth

  • I work professionally from Windows, and as a hobby from Linux. My tool of choice for coding in .NET is Visual Studio Code (not FOSS, but there is a FOSS version which is just a bit more limited). It’s not as complete as Visual Studio, but it’s much faster, it has all the basic tools including a debugger, and it’s much more customizable.

    Also if you have never done it before, you might love dotnet watch which works with any IDE and lets you make realtime changes to your code while the application is already running.

    As for UI, my personal choice is deploying a static website on localhost through Kestrel (it’s less than 100 lines of code for a fully configured one), and then let the user’s browser take care of showing the UI. You could use Blazor if you really want to use C# all the way, but my personal recommendation is to stick to web technologies such as TypeScript and React (using either Parcel or Vite to build your project). Making your UI web-friendly also makes your app cloud-ready, in case tomorrow you will decide that’s something you need.

    Finally, you can now deploy .NET apps as a single self-contained executable on all major platforms. But as already recommended by other users, I would keep adopting a web-first approach and go for Docker, and eventually Kubernetes. It’s a lot of work to understand it properly though, so perhaps you can start studying this topic another day in the future.

    Feel free to ask me anything if you have questions.

  • I’m a professional and hobbyist C# .NET dev and I recently made the switch to a full Linux environment at home. I’ve gotten a great workflow setup with just VSCode and some extensions. I’ve actually found some ways to improve my workflow with VSCode vs Visual Studio and I’m glad I made the switch. The only thing I really miss is the phenomenal diagnostics and profiling I would get with a full Visual Studio install, but I’m getting used to using cli dotnet tools to replace that as well.

    If you’re going the VSCode route, feel free to ask me more questions on useful extensions or workflow tweaks!

  •  astrsk   ( @astrsk@kbin.social ) 
    link
    fedilink
    7
    edit-2
    5 months ago

    Jetbrains Rider is fantastic and .net 6+ is native to Linux now. You can even get by with VSCode (I prefer VSCodium) with their improved C# tools.

    Depending on what you do, there’s also cross platform UI libraries like Avalonia-UI that can fully replace WPF.

  • Another Rider user. I write mainly backed code, and integrations etc. Work is Rider and Datagrip on windows. Home is Debian KDE with Rider and Datagrip. I love it. If only I can convince my it group to allow Debian on my work computer.