Open
Description
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:
@page "/"
@using QRCoder
@using System.Drawing
<h1>Hello, world!</h1>
@code {
protected async override Task OnInitializedAsync()
{
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);
await base.OnInitializedAsync();
}
}
Your Environment
VS 2022 latest
Nuget QRCoder latest:
.NET 6 Blazor Server
Metadata
Metadata
Assignees
Labels
No labels