News for hackers. Stuff that matters.
Re:Ask HN: Current state of coding .NET code on non-Windows ... by uticus on Thursday May 26, 2022 @01:52PM (#31521394)
> A lot of libraries expect and assume you are on Windows

I'm curious about this. Can you give an example of a library that refused to work? I'm having trouble imagining what would cause something to break on Linux - but not on Windows - in a typical .NET library or NuGet package.

Re:Ask HN: Current state of coding .NET code on non-Windows ... by CodesInChaos on Thursday May 26, 2022 @04:55PM (#31523246)
MS deprecated Linux support for System.Drawing in .net 6.0 and will remove it in 7.0. https://docs.microsoft.com/en-us/dotnet/core/compatibility/c...
Re:Ask HN: Current state of coding .NET code on non-Windows ... by Kuinox on Friday May 27, 2022 @08:47AM (#31528938)
System.Drawing never worked well on linux, and is mostly used in windows-only gui.

To generate/process images, there are other, great, .NET library like SkiaSharp, or ImageSharp.

Re:Ask HN: Current state of coding .NET code on non-Windows ... by CodesInChaos on Saturday May 28, 2022 @02:09PM (#31542425)
I think there is still a lot of benefit in a first-party library which provides shared abstractions like `Color` and `Bitmap`, even without any fancy manipulation capabilities.
Re:Ask HN: Current state of coding .NET code on non-Windows ... by davidhbolton on Sunday May 29, 2022 @08:59AM (#31548805)
I came across this with System.Drawing on Ubuntu and successfully managed to replace it with SkiaSharp code instead. It was drawing a map for a game in memory then saving to a .jpg file.

I use VS 2022 Community on Windows, tested it there then published to Linux and uploaded over SSH to a VPS. It worked very nicely.

Re:Ask HN: Current state of coding .NET code on non-Windows ... by aaaaaaaaata on Friday May 27, 2022 @09:30AM (#31529392)
So are these mostly documentation/outreach issues, then?
Re:Ask HN: Current state of coding .NET code on non-Windows ... by Kuinox on Friday May 27, 2022 @11:17AM (#31530577)
The documentation of System.Drawing point to these projects:

> If you can't use System.Drawing with your application, recommended alternatives include ImageSharp, SkiaSharp, Windows Imaging Components, and Microsoft.Maui.Graphics

Sadly .NET devs will jump on any first party software and won't look a lot in community alternatives.