Re:Ask HN: Developing .NET on Windows but deploying to Linux...
by 369548684892826 on Thursday March 12, 2026 @07:16PM
(#47358591)
I guess watch out for different line endings in files "\r\n" in Windows, "\n" in Linux. The best thing to do there if possible is use tools in Windows that preserve Linux line endings so you never see "\r\n" in Linux at runtime.
If you're using classes under the System.Drawing namespace then a lot of functionality is missing in Linux, but I don't know much about that. The 3rd party ImageSharp library fills some of the gap and is just generally awesome.
Other than that, I'm sure there's niche things but nothing is coming to mind!
Linux just makes them visible much earlier.
I'll definitely take another look at the System.IO helpers you mentioned to avoid some of that.
Are there any other common pitfalls you’ve seen when running .NET apps on Linux that are easy to overlook?