IronBarcode のランタイムコピー例外を解決する
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スキャンをオフにすると、いくつかのバーコードの検出が困難になる場合があります。この機能はバーコードの検出を助けるからです。
// 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 リリース






