Mixed mode assembly is built against version 'v2.0.50727' 解决方案
2012-03-14 14:14
531 查看
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.解决方案
当一个vs2010版本一下的项目转为2010项目时,会遇到这个错误:Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
搜索下
解决方案如下:
<CONFIGURATION><STARTUP useLegacyV2RuntimeActivationPolicy="true"><SUPPORTEDRUNTIME version="v4.0"/><REQUIREDRUNTIME version="v4.0.20506"/></STARTUP> </CONFIGURATION>
如果不行,修改如下:
<configuration><startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0"/></startup></configuration>
至于为什么,帖一段e文的解释
:
After a bit of time (and more searching), I found this blog entry byJomoFisher.One of the recent problems we’ve seen is that, because of the support for side-by-side runtimes,.NET 4.0 has changed the way that it binds to older mixed-mode assemblies.These assemblies are,for example, those that are compiled from C++\CLI.Currently available DirectX assemblies are mixed mode.If you see a message like this then you know you have run into the issue:Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.[Snip]The good news for applications is that you have the option of falling back to .NET 2.0 era binding for these assemblies bysetting an app.config flag like so:<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0"/></startup>So it looks like the way the runtime loads mixed-mode assemblies has changed. I can't find any details about this change, or why it was done. But the useLegacyV2RuntimeActivationPolicy attribute reverts back to CLR 2.0 loading.
解释的链接:http://stackoverflow.com/questions/1604663/what-does-uselegacyv2runtimeactivationpolicy-do-in-the-net-4-config
希望能够帮到你
相关文章推荐
- VS2012载入DLL编译出现试图载入格式不对的程序; 以及执行出现Mixed mode assembly is built against version 'v2.0.50727' of the
- VS2012加载DLL编译出现试图加载格式不正确的程序; 以及运行出现Mixed mode assembly is built against version 'v2.0.50727' of the
- system.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727'...问题解决方案
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additio
- “System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 错误
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- C#中遇到dll与.net 4.0不兼容,Mixed mode assembly is built against version 'v2.0.50727' 的解决办法
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additio
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration info
- .NET Business Connector mode assembly is built against version 'v2.0.50727' of the runtime
- Mixed mode assembly is built against ver
- VS2008工程移植到2010的问题'system.io.fileloadexception was unhandled message=mixed mode assembly is built ag
- ubuntu安装python2.7出现python-minimal is already the newest version....解决方案
- “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured 这个错误解决方案
- Which version of NetFx is built into Windows
- 解决方案: Your version of the Windows SDK is earlier than 6.0. Try setting the 'WINVER' and '_WIN32_WINN
- Project facet Java version 1.8 is not supported 解决方案