![](/img/trans.png)
[英]Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral
[英]Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib
我正在使用Unity IoC(Microsoft.Practices.Unity),我可以正常編譯,但是我在運行時遇到以下錯誤:
Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Unity版本是:3.0.1026.0
.Net 4和此版本的Unity之間是否存在兼容性問題。 此外,使用Unity v2時出現相同的錯誤。 如果是這樣,我該如何解決這個問題呢?
編輯:另外,我已經驗證我的項目中引用了mscorlib。
解決。
實際上我使用的是.NET 4.5預覽版,它引用了我在.NET 4.0世界中不存在的類。 感謝Hans Passant以驚人的速度發現問題!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.