“FileLoadException was unhandled”解決方法

如圖出現的錯誤,

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>

 

如圖:

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章