codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.59k stars 1.09k forks source link

Could not resolve type with token 0100002b from typeref #199

Closed ghbarr closed 3 years ago

ghbarr commented 5 years ago

Type of issue

[ ] Bug
[X] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

I am using the 5 lines of code to generate the barcode, I have imported both System.Drawing and QRCoder libraries.

QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(encodeData, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);   //error occurs on this line
Bitmap qrCodeImage = qrCode.GetGraphic(20);

I would expect a QR Code to be generated

Current Behavior

System.TypeLoadException: 'Could not resolve type with token 0100002b from typeref (expected class 'QRCoder.QRCode' in assembly 'QRCoder, Version=1.3.6.0, Culture=neutral, PublicKeyToken=null')'

Your Environment

almirvuk commented 5 years ago

Same exception on Xamarin.Forms as well Xamarin.Forms with .NETStandard 2.0