解决 IronBarcode 中的运行时复制异常
This article was translated from English: Does it need improvement?
TranslatedView the article in English
在某些罕见情况下,由于我们特殊机器学习模型的 DLL 文件没有正确复制,会导致此错误。 下面的解决方案可以解决这个一次性错误。
Machine learning DLLs were not successfully automatically copied from the runtimes directory. This may occur on various operating systems or frameworks...解决方案
- 解决此问题的方法是首先导航到
runtimes文件夹。 在您的解决方案中,它将位于/bin/Debug/net6.0/runtimes下(Debug 是一个示例,请按照您设置的配置进行操作)(如果您使用的是不同的目标框架,请替换net6.0)。 - 您将在
/runtimes/中看到所有受支持的平台和操作系统目录,进入适用于您的目录,并将文件手动复制到输出/bin/Debug/net6.0/目录中。 - 禁用机器学习扫描也可以防止出现此错误。 但是,您应该注意,关闭 ML 扫描可能会使某些条形码更难被检测到,因为此功能有助于条形码检测。
// Define scanning options, disabling machine learning for basic scan only
var myOptionsExample = new BarcodeReaderOptions
{
// ScanMode is set to only use the basic scan, without ML-enhanced features
ScanMode = BarcodeScanMode.OnlyBasicScan
};
// Perform barcode reading with the specified options
var results = BarcodeReader.Read("barcode.png", myOptionsExample);// Define scanning options, disabling machine learning for basic scan only
var myOptionsExample = new BarcodeReaderOptions
{
// ScanMode is set to only use the basic scan, without ML-enhanced features
ScanMode = BarcodeScanMode.OnlyBasicScan
};
// Perform barcode reading with the specified options
var results = BarcodeReader.Read("barcode.png", myOptionsExample);' Define scanning options, disabling machine learning for basic scan only
Dim myOptionsExample = New BarcodeReaderOptions With {.ScanMode = BarcodeScanMode.OnlyBasicScan}
' Perform barcode reading with the specified options
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)$vbLabelText $csharpLabel
准备开始了吗?
Nuget 下载 2,002,059 | 版本: 2025.12 刚刚发布






