解析 IronBarcode 中的運行時複製異常
2023年10月5日
已更新 2024年10月20日
This article was translated from English: Does it need improvement?
TranslatedView the article in English
在一些罕見的情況下,如果我們的特殊 ML 模型的 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 掃描也可以預防錯誤。 但是,您應該注意,關閉 ML 掃描可能會使某些條碼更難檢測,因為此功能有助於條碼檢測。
var myOptionsExample = new BarcodeReaderOptions
{
// Not using ML in scanning
ScanMode = BarcodeScanMode.OnlyBasicScan
};
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
var myOptionsExample = new BarcodeReaderOptions
{
// Not using ML in scanning
ScanMode = BarcodeScanMode.OnlyBasicScan
};
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
Dim myOptionsExample = New BarcodeReaderOptions With {.ScanMode = BarcodeScanMode.OnlyBasicScan}
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
$vbLabelText $csharpLabel