我使用Ironbarcode读取图像上的条形码, 但我总是收到异常消息:
System.MissingMethodException HResult = 0x80131513消息=方法 找不到:'System.Collections.IEnumerator PdfSharp.Pdf.PdfPages.GetEnumerator()'。Source = IronBarCode
我从没在此项目中使用Pdfsharp,也无法弄清楚为什么收到此消息! 有人可以帮我吗?
using ironbarcode;
BarcodeResult result = BarcodeReader.QuicklyReadOneBarcode(@"barcode_testing1.jpg");
Console.WriteLine($"Barcoe Text: {result.Value}");
答案 0 :(得分:0)
这是因为PDFsharp版本问题。
尝试以下版本
包id =“ PDFsharp”版本=“ 1.32.3057.0” targetFramework =“ net472”
对于初学者: 在package.json中添加以上行。 如果您使用的是VS,则右键单击解决方案->单击“还原NuGet软件包”。