QRCoder
QRCoder copied to clipboard
The type name 'Bitmap' could not be found in the namespace 'System.Drawing'.
Error CS1069 The type name 'Bitmap' could not be found in the namespace 'System.Drawing'. This type has been forwarded to assembly 'System.Drawing.Common, Version=0.0.0.0, Culture=neutral,
InfoBoard (net7.0-android), InfoBoard (net7.0-ios), InfoBoard (net7.0-maccatalyst)
The name 'QrCodeImage' does not exist in the current context
(net7.0-android), InfoBoard (net7.0-ios), InfoBoard (net7.0-maccatalyst), InfoBoard (net7.0-windows10.0.19041.0)
The issue is mainly you have updated your app to a latest framework e.g. net6.0 or 7.0. And this System.Drawing is not supported in non-windows platforms. This library is not recommended now, Microsoft recommends to use a newer library that belongs to ".NET Multi-platform App UI" Microsoft.Maui.Graphics and other. More information here...
I would request the developer of this Nuget library to upgrade their code libraries to the recommended ones for better compatibility for future.
Perfectly explained @devtram, thanks! @mgungorchamp you can use one of the other rendering classes that are supported on non-Windows platforms (e.g. PngByteQRCode). You can find a full compatability matrix in our wiki: https://github.com/codebude/QRCoder/wiki/Advanced-usage---QR-Code-renderers#2-overview-of-the-different-renderers
Long-term, with QRCoder "2.0" we plan to move away from System.Drawing.