解決 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 掃描也可以防止此錯誤。 但是,您應該注意,關閉 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);$vbLabelText $csharpLabel
準備好開始了嗎?
Nuget 下載 2,035,202 | 版本: 2025.12 剛剛發布






