執行階段複製例外
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資料夾。 此內容位於/bin/Debug/net6.0/runtimes(若您的設定與此不同,請將Debug替換為您的當前設定,並將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請務必將
<your-platform>替換為與您平台相符的適當目錄(例如:linux-x64等)。 - 重新建置與測試: 複製完畢後,請重新建置專案以確認問題已解決。 現在,ML 模型應已具備正確的 DLL 檔案以供運作。
準備開始了嗎?
Nuget 下載 67,270 | 版本: 2026.5 just released

