-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Type or namespace "QRCode" could not be found in new Blazor Server .Net 6 App #377
Comments
I have the same problem in version 1.4.3 and use .NET 6 |
I having the same problem in version 1.4.3 and .NET 6. So I downgraded to 1.4.2. |
Same here, I had to downgrade. |
I experienced the same when upgrading my class lib to .NET 6. Was able to make it work by setting Target OS to Windows on project settings but I would prefer not having to do this, if possible. |
Here explanations and possible solutions. |
Same here. |
Work for me by downgrading the version to the 1.4.2 |
You can try: PngByteQrCode OR |
For those wondering how to display a QR code in Blazor WASM using .NET 6+, you might want to try this: @using QRCoder
<img src=@("data:image/png;base64," + System.Convert.ToBase64String(
PngByteQRCodeHelper.GetQRCode("text you want displayed as QR code", QRCodeGenerator.ECCLevel.Q, 10))) /> |
after downgrading to 1.4.2, this inline code worked, thanks for the suggestion |
Type of issue
[X] Bug
Expected Behavior
I'm trying your sample code for QRCoder, and the "QRCode" reference in the code should be found from the using statement:
@using QRCoder
...
QRCode qrCode = new QRCode(qrCodeData);
Current Behavior
I'm getting type or namespace" QRCode "could not be found in a brand new Blazor Server .Net 6 app using your sample code:
@using QRCoder
...
QRCode qrCode = new QRCode(qrCodeData);
Steps to Reproduce (for bugs)
Create a blazor server app and paste this code into the index.razor page:
Your Environment
VS 2022 latest
Nuget QRCoder latest:
.NET 6 Blazor Server
The text was updated successfully, but these errors were encountered: