question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.Drawing.Common is deprecated on non-Windows platforms

See original GitHub issue

Hello, I work on the .NET Libraries team, and I saw that this library has a lot of usage in the community and depends on System.Drawing.Common for xplat scenarios.

We just made the decision to make System.Drawing.Common a windows only library starting .NET6+ due to a lot of reasons after a long discussion. You can see more details here: https://github.com/dotnet/designs/blob/a15a8c7a324c482c5e38b73e46c2afe56f6bd504/accepted/2021/system-drawing-win-only/system-drawing-win-only.md

Also: https://github.com/dotnet/docs/issues/25257

We wanted to reach out so that you could react to this changes when .NET 6 is released. Also if you have any questions/concerns please do let us know at https://github.com/dotnet/runtime

What is the recommended action to still support winforms/wpf scenarios for example as I see your library does?

You can mark those APIs as windows only using the SupportedOSPlatform("windows") annotation, and then add new APIs that use another library like ImageSharp or SkiaSharp.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
codebudecommented, Oct 31, 2021

Hi Alex, I will try to port it to ImageSharp, but it may take some time.

5reactions
mwettstecommented, Oct 22, 2021

Another benefit of removing this dependency would be that the library could also be used with Blazor WASM. I just tried to get a simple Wifi QR Code Generator working, but unfortunately this is not possible, since System.Drawing is not supported in Blazor WASM.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.Drawing.Common only supported on Windows - .NET
Learn about the .NET 6 breaking change where the System.Drawing.Common package is no longer supported on non-Windows operating systems.
Read more >
System.Drawing.Common is deprecated on non-Windows ...
Hello, I work on the .NET Libraries team, and I saw that this library has a lot of usage in the community and...
Read more >
.Net 7 and Docker (System.Drawing deprecated on non- ...
Learn about the .NET 6 breaking change where the System.Drawing.Common package is no longer supported on non-Windows operating systems.
Read more >
System.Drawing.Common is not supported on non- ...
I am using spire pdf for Watermark functionality in .net 6.0. I am getting the below error when I run the application in...
Read more >
Is it safe to use System.Drawing.Common 4.7.3?
Drawing.Common and I noticed that while version 6 and 7 are not usable on Linux, version 5 is marked as deprecated and versions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found