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.

在VS2012上运行一些.net是2.0版本的dll时,会弹出如此错误。大致意思是:混合模式引用是建立针对版本“v2.0.50727”的运行时,不能加载在4.0运行时没有额外的配置信息。

网上查到http://social.msdn.microsoft.com/Forums/vstudio/en-US/58271e39-beca-49ac-90f9-e116fa3dd3c0/mxed-mode-dll-unable-to-load-in-net-40?forum=clr

解决方案如下:

The only way the app config updates worked for me was to add it both to the dll assembly and the project using the dll. Also, I had to use the following config update. This is done on a VS2008 or VS2010 project ported to VS2012.
也就说在配置文件里加上如下信息即可:
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    <requiredRuntime version="v4.0.20506"/>
  </startup>
</configuration>

至此问题解决,大功告成!!!

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的更多相关文章

  1. 【转载】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

    网上查到http://social.msdn.microsoft.com/Forums/vstudio/en-US/58271e39-beca-49ac-90f9-e116fa3dd3c0/mxed- ...

  2. VS2012载入DLL编译出现试图载入格式不对的程序; 以及执行出现Mixed mode assembly is built against version &#39;v2.0.50727&#39; of the

    VS2012载入DLL编译出现试图载入格式不对的程序:以及执行出现Mixed mode assembly is built against version 'v2.0.50727' of therun ...

  3. Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its de

    页面加载时出现这个错误: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cul ...

  4. Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

    提示哪个引用修改哪个引用的属性: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, ...

  5. 错误 : 资产文件“项目\obj\project.assets.json”没有“.NETCoreApp,Version=v2.0”的目标。确保已运行还原,且“netcoreapp2.0”已包含在项目的 TargetFrameworks 中。

    升级 vs201715.6.3之后发布出现 错误 : 资产文件“项目\obj\project.assets.json”没有“.NETCoreApp,Version=v2.0”的目标.确保已运行还原,且 ...

  6. 已使用.netframework,version=v4.6.1 而不是目标框架netcoreapp,version=v2.1 还原包,此包可能与项目不完全兼容

    已使用.netframework,version=v4.6.1 而不是目标框架netcoreapp,version=v2.1 还原包,此包可能与项目不完全兼容 NU1202: 包 System.Run ...

  7. Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0...

    一.在Mvc 发布时出现如下错误: Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0... 出现错误的原因是 Mvc版本 ...

  8. Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not mat

    Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b ...

  9. Could not load file or assembly ‘ Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342’ or one of its dependencies系统找不到指定文件 处理方法

    前些天做EF Model-First测试,开发环境为VS2013,数据库为Oracle 11g.所有东西都装好数据模型已经建立后准备执行“根据模型生成数据库”命令时,出现:Could not load ...

随机推荐

  1. ios 页面过长卡顿的情况

    解决方案如下: -webkit-overflow-scrolling: touch;

  2. Learning to Compare: Relation Network 源码调试

    CVPR 2018 的一篇少样本学习论文 Learning to Compare: Relation Network for Few-Shot Learning 源码地址:https://github ...

  3. Android 4.4 (KitKat) SMS Apis Change——Android 4.4的一个重大变化

    Android团队通过Android开发博客透漏今年会放出Android 4.4 (KitKat) ,同时更新了 SMS 的部分API.博客上讲只有default SMS app才能对短信数据库有写权 ...

  4. Django - admin后台、auth权限

    admin后台 一.创建一个管理员用户 (1).设置时区.语言(可选步骤) 打开settings.py,改成下面那样 LANGUAGE_CODE = 'zh-Hans' TIME_ZONE = 'As ...

  5. bzoj2656

    题目链接:传送门 题目大意:已知 a0=0:a1=1: n为偶数 an=a(n/2):n为基数 an=a(n/2)+a(n/2+1): 题目思路:因为n过大,所以要用java高精度,还有最多20组数据 ...

  6. cascade(级联)和inverse关系详解

    序言 写这篇文章之前,自己也查了很多的资料来搞清楚这两者的关系和各自所做的事情,但是百度一搜,大多数博文感觉说的云里雾里,可能博主自己清楚是怎么一回事,但是给一个不懂的人或者一知半解的人看的话,别人也 ...

  7. 关于Z序的总结

    //转自:http://blog.csdn.net/flowshell/article/details/4797917 Z 序:一个重叠窗口的堆,每个窗口在Z 序中 都有唯一一个位置.一个窗口的Z 序 ...

  8. CodeForces 670C Cinema(排序,离散化)

    C. Cinema time limit per test 2 seconds memory limit per test 256 megabytes input standard input out ...

  9. CodeForces 156A Message(暴力)

    A. Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou ...

  10. Java基础系列(八)序列化与反序列化

    先来看两个例子 示例一:将对象保存成字节数组,再把对象的字节数组还原为对象 示例中用到的Bean package com.huawei.beans; import java.io.Serializab ...