Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Drawing.Common dependency / .Net 6.0 support #69

Closed
alex-jitbit opened this issue Oct 25, 2021 · 5 comments
Closed

System.Drawing.Common dependency / .Net 6.0 support #69

alex-jitbit opened this issue Oct 25, 2021 · 5 comments

Comments

@alex-jitbit
Copy link

alex-jitbit commented Oct 25, 2021

You rely on System.Drawing.Common (via QRCoder) which has known issues on Linux and will be removed (marked as platform-specific) in .NET 6.0 here the official announcement https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

@alex-jitbit
Copy link
Author

Also see this codebude/QRCoder#315

@ahwm
Copy link
Collaborator

ahwm commented Oct 25, 2021

Thanks for the information! We'll keep an eye on it and when (if) QRCoder releases a new version that addresses that then we'll update that.

@flytzen flytzen mentioned this issue Dec 2, 2021
@flytzen flytzen changed the title System.Drawing.Common dependency System.Drawing.Common dependency / .Net 6.0 support Apr 13, 2022
@flytzen
Copy link
Collaborator

flytzen commented Apr 13, 2022

So it looks like #102 solves this - at least for now - and makes it run on .Net 6 on both Windows and Linux.
I am not really sure as to how. Maybe @TristanBoland's change to use PngByteQRCode uses a different code path in QR coder that does not rely on System.Drawing.
@ahwm If correct, then we can probably close this as well once we release the fix in #102? Or do we need to dig into this a bit more to make sure?

@ahwm
Copy link
Collaborator

ahwm commented Apr 13, 2022

So it looks like #102 solves this - at least for now - and makes it run on .Net 6 on both Windows and Linux. I am not really sure as to how. Maybe @TristanBoland's change to use PngByteQRCode uses a different code path in QR coder that does not rely on System.Drawing. @ahwm If correct, then we can probably close this as well once we release the fix in #102? Or do we need to dig into this a bit more to make sure?

Looking at the PngBytQRCode.cs file it looks like it manages not to depend on System.Drawing by writing predefined byte values directly to a stream. I could potentially see that working for all frameworks.

https://github.com/codebude/QRCoder/blob/v1.4.3/QRCoder/PngByteQRCode.cs (starting line 99)

@flytzen
Copy link
Collaborator

flytzen commented Apr 13, 2022

Fixed in #102.
Will be released in 2.5 - see #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants