[英]Reference Component could not be found
我正在嘗試開發應用程序,但隨后彈出這些警告。 我曾嘗試禁用防病毒軟件(Avira),但仍然無法正常工作。
Warning 1 Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'MyAssembly.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. ConsoleApplication1
Warning 2 The referenced component 'MyAssembly' could not be found.
有人可以幫幫我嗎? 謝謝!
您的應用程序正在開發哪個.NET運行時版本?
如果錯誤是可以信任的,則您的項目為.NET 3.5(2.0運行時)項目,但是MyAssembly庫是在.NET 4.0中開發的,因此會導致您看到錯誤。
您不能在較舊的運行時版本項目中引用較新的運行時版本程序集。 您必須“升級”您的項目,以至少匹配提供給您的程序集的框架版本。
右鍵單擊您的項目文件,然后選擇屬性。 根據所使用的Visual Studio版本的不同,此屏幕看起來可能有所不同,但是請轉到應用程序選項卡,查看目標框架是什么。
然后轉到引用中引用的程序集,然后在屬性部分中檢查“運行時版本”:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.