解決方案
此錯誤表明程式集引用的版本(
<YYYY>)與項目指向的版本(
<ZZZZ>)之間存在版本不匹配的問題。若要更正此問題,您需要在Solution Explorer中重新添加正確的reference。
- 確認您的電腦上存在DLL版本<YYYY>。如果您的應用程式包含設備驅動程式API,請參考部署應用程式所需的NI .NET程式集來確定DLL的位置,以及更多訊息。
- 從Solution Explorer中刪除錯誤中指示的<DLL名稱>reference。
- 右鍵單擊References >> Add Reference...
- 如<DLL Name YYYY>中所示,在.NET選單下選擇正確的程式集版本。
例如,
Assembly 'WIAlib, Version=3.13.0.0, Culture=neutral, PublicKeyToken=null'
uses
'NationalInstruments.UI, Version=9.1.40.204, Culture=neutral, PublicKeyToken=dc6ad606294fc298'
which has a higher version than referenced assembly
'NationalInstruments.UI.WindowsForms, Version=9.0.40.292, Culture=neutral, PublicKeyToken=dc6ad606294fc298'表示該項目當前指向較舊版本的
NationalInstruments.UI。您需要從Solution Explorer中刪除
NationalInstrument.UI,並添加引用的
National Instruments User Interface Library version 9.1.40.204和
National Instruments Windows Forms Controls version 9.1.40.204。