解決IronBarcode中的運行時複製異常
This article was translated from English: Does it need improvement?
Translated
View 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只是個例子,請根據您設定的Configuration進行操作)。 (If you're using a different target framework, replacenet6.0.) - 在
/bin/Debug/net6.0/目錄中。 - 禁用ML掃描也能防止此錯誤發生。 然而,您應注意,關閉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,331,688 | 版本: 2026.7 剛剛發布

