zoukankan      html  css  js  c++  java
  • 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集

    在使用.Net2.0和.Net4.0混合开发,启动应用程序时遇到了“混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。”这个错误提示。解决方案如下:

    在app.config中的configuration节内添加子节Startup,详细如下:

    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku = ".NETFramework,Version=v4.0"/>
    <supportedRuntime version="v2.0.50727"/>
    </startup>

    ,之后完整的app.config看起来就像这样:

    <?xml version="1.0"?>
    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku = ".NETFramework,Version=v4.0"/>
    <supportedRuntime version="v2.0.50727"/>
    </startup>
    </configuration>
  • 相关阅读:
    大数据总结
    spark_streaming_微批量处理
    spark_sql_解析器
    spark_sql_函数
    spark-sql-04-spark连接hive的几种方式
    spark-sql-04-on_hive
    spark-sql-04-hive
    CF550C Divisibility by Eight
    CF489C Given Length and Sum of Digits...
    CF550A Two Substrings
  • 原文地址:https://www.cnblogs.com/zhongxia/p/4290425.html
Copyright © 2011-2022 走看看