未能从程序集“mscorlib程序加载类型System.Reflection.IntrospectionExtensions” [英] Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib

查看:2714
本文介绍了未能从程序集“mscorlib程序加载类型System.Reflection.IntrospectionExtensions”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是统一的IoC(Microsoft.P​​ractices.Unity),我可以编译罚款,但我得到了下面的错误在运行时:

I'm using Unity IoC (Microsoft.Practices.Unity) and I can compile fine, but I'm getting the following error at run time:

Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

的统一版本:3.0.1026.0

The Unity version is: 3.0.1026.0

有没有和.Net 4之间的兼容性问题,此版本的统一。另外,我使用Unity V2时,得到同样的错误。如果是这样,我怎么可能去解决这个问题?

Is there a compatibility problem between .Net 4 and this version of Unity. Also, I get the same error when using Unity v2. If so, how might I go about resolving this issue?

编辑: 另外,我已经验证了的mscorlib在我的项目中引用。

Also, I've verified that mscorlib is referenced in my project.

推荐答案

解决。

事实上,我用的是.NET 4.5 preVIEW版本,这是引用未在我的.NET 4.0的世界存在的一类。感谢汉斯帕桑特在您确定了问题的惊人速度!

Indeed I was using the .NET 4.5 preview version, which was referencing a class that didn't exist in my .NET 4.0 world. Thanks Hans Passant for the amazing speed in which you identified the problem!

这篇关于未能从程序集“mscorlib程序加载类型System.Reflection.IntrospectionExtensions”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆