-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Error: QRCode does not contain a Constructor that takes 1 argument #360
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
Comments
Hi @sonisp , the errors look a little bit strange. Can you please show/post the part of your code with the I tried to reproduce the error and created a minimal project (VS2022, .NET4.7.2, QRCoder 1.4.2) with the following code and everything worked as expected: using QRCoder;
using System.Drawing;
namespace ConsoleAppQRCodeTest
{
internal class Program
{
static void Main(string[] args)
{
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);
System.Console.WriteLine("Successfully generated QR code.\nPress <any> key to end the program.");
System.Console.ReadKey();
}
}
} Feel free to download my test project and try it yourself. If it runs, there must be another error in your app: ConsoleAppQRCodeTest.zip |
Hi @sonisp , could you try out my sample project and if so, does it run on your environment? |
Hi @codebude, will try and revert. Ty |
Since I haven't heard anything, I guess it worked out and will close the issue now. If you still have problems, let me know, then we can re-open the issue. |
@jianliulin it can't work in net6.0... #361 (comment) |
Hi,
I have downloaded and installed the Nuget Package QRCoder 1.4.2 and when I am trying to use the Constructor I am getting the below two bugs.
Type of issue
Bug 1: QRCode does not contain a Constructor that takes 1 argument . Attached reference QRCode_Constructor_Bug.png
Bug 2: QRCode does not contain a definition for GetGraphic and no accessible method..etc. Attached reference QRCode_GetGraphic_Bug.png
Steps to Reproduce (for bugs)
Your Environment
The text was updated successfully, but these errors were encountered: