如圖出現的錯誤,
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上運行一些.net是2.0版本的dll時,會彈出如此錯誤。
意思是:混合模式引用是建立針對版本“v2.0.50727”的運行時,不能加載在4.0運行時
沒有額外的配置信息。
解決方法:
在App.Config文件中加入如下代碼
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
如圖: