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.

.NET 6 - System.Drawing.Common is no longer supported on non-Windows systems

See original GitHub issue

With .NET 6, System.Drawing.Common become a “Windows-only” dependency.

See this official Microsoft note about the breaking change. They it’s mainly because libgdiplus used on Linux systems is “subpar”.

SVG uses System.Drawing.Common, thus libgdiplus, so it’s having issues with my docker image based on aspnet:6.0-alpine . Any plans to migrate to one of the recommended alternatives?

Recommended action To use these APIs for cross-platform apps, migrate to one of the following libraries:

ImageSharp SkiaSharp Microsoft.Maui.Graphics

– Sidenote: the reason I got into this is because I have an alignment issue under Linux that I do not have under Windows.

image

The code relies on amountSvgText.Dx = new SvgUnitCollection { new(SvgUnitType.Pixel, CONSTANT - amountSvgText.Bounds.Width) }; and I believe the culprit is libgdiplus.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mrbean-bremencommented, Dec 30, 2021

See also #910.

0reactions
wxdltcommented, May 12, 2022

Due to the problem of memory non release in Linux, when can It release a new version?

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 not supported on non- ...
The exception message is correct: System.Drawing.Common is no longer supported on .Net 6 on Linux and macOS. For more information, see this ...
Read more >
System.Drawing.Common config switch removed - .NET
The runtime configuration switch to re-enable usage of the package on non-Windows operating systems has been removed in .NET 7. Old behavior.
Read more >
System.Drawing.Common is not supported ... - Documentation
NET 6 and .NET 7 project project runs correctly in Windows environment. The following error occurs when running it under a Linux and...
Read more >
Alternative to System.Drawing.Common
In .NET6 and .NET7, Microsoft has stopped supporting Linux and MacOs, and System.Drawing.Common will only work on Windows. Workarounds to ...
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