在c#中当引入的dll与当前的.net版本不支持时,需要加入下列语句

   

       当项目中出现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.等等类似的提示时。

     在.net中,当引入的dll与当前的.net不支持的时候,在下项目的配置文件app.config <configuration>标签中加入



<span style="font-size:24px;"><startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup></span>



即可解决问题

猜你喜欢

转载自blog.csdn.net/zhushiq1234/article/details/51997688