解決IronBarcode中的運行時複製異常
Curtis Chau
Updated: 2026年5月9日
此錯誤在某些罕見情況下會發生,原因是我們專用的ML模型的DLL未正確複製。 在以下解決方案中,您可以解決此一時性的錯誤。
Machine learning DLLs were not successfully automatically copied from the runtimes directory. This may occur on various operating systems or frameworks...
Text
解決方案
- 解決此問題的方法是首先導航到
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
Dim myOptionsExample = New BarcodeReaderOptions With {.ScanMode = BarcodeScanMode.OnlyBasicScan}
' Perform barcode reading with the specified options
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多