執行時複製例外
This article was translated from English: Does it need improvement?
Translated
View the article in English
此錯誤在某些罕見的情況下發生,因為我們的特殊ML模型的DLL沒有正確複製。 在下方的解決方案中,您可以解決此一性錯誤。
IronQrDetection.Exceptions.IronQrRuntimesCopyException:機器學習DLL未能成功自動從執行時目錄複製。 這可能發生在各種作業系統或框架上。 請按照以下文章中的步驟來解決此問題:https://ironsoftware.com/csharp/qr/troubleshooting/runtimes-copy-exception/
解決方案
-
定位
runtimes資料夾: 在您的解決方案中導航到runtimes資料夾。 這可以在net6.0替換為您的目標框架,如果有不同的話)。 -
複製必要的文件: 在
/runtimes/目錄中,您將找到所有支援平台和操作系統的子目錄。 進入針對您的操作系統的目錄,然後手動將必要的文件複製到輸出目錄:/bin/Debug/net6.0/。# Example bash command to copy files on Unix-like systems cp /bin/Debug/net6.0/runtimes/<your-platform>/* /bin/Debug/net6.0/# Example bash command to copy files on Unix-like systems cp /bin/Debug/net6.0/runtimes/<your-platform>/* /bin/Debug/net6.0/SHELL# Example PowerShell command to copy files on Windows systems Copy-Item -Path .\bin\Debug\net6.0\runtimes\<your-platform>\* -Destination .\bin\Debug\net6.0\# Example PowerShell command to copy files on Windows systems Copy-Item -Path .\bin\Debug\net6.0\runtimes\<your-platform>\* -Destination .\bin\Debug\net6.0\SHELL確保替換
win-x64,osx-x64,linux-x64等)。 - 重建和測試: 當必要的文件複製完後,重建您的專案以驗證問題是否已解決。 正確的DLL現在應該可供ML模型運作。
準備好開始了嗎?
Nuget 下載 70,398 | 版本: 2026.7 剛剛發布

