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の下にあります (デバッグは例であり、設定した構成に従ってください) (別のターゲット フレームワークを使用している場合は、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);
' 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,167,753 | バージョン: 2026.4 リリース

