混合模式程序集是针对运行时的“v2.0.50727"版本构建的 [英] Mixed mode assembly is built against version ‘v2.0.50727′ of the runtime
本文介绍了混合模式程序集是针对运行时的“v2.0.50727"版本构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到以下异常:
混合模式程序集是针对运行时的v2.0.50727"版本构建的,如果没有附加配置信息,则无法在 4.0 运行时中加载.
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.
当我试图从我的 WPF 程序中导出水晶报表时...
as I was trying to export crystal report from my WPF program...
我已经在 app.config 中添加了以下内容...
I have added the following in the app.config already...
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
有没有专家可以帮忙??????
Any experts can help????
我发现的参考:http:///www.davidmoore.info/2010/12/17/running-net-2-runtime-applications-under-the-net-4-runtime
推荐答案
尝试在配置节点下的 app.config 中使用这个确切的启动标记
Try to use this exact startup tag in your app.config under configuration node
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<requiredRuntime version="v4.0.20506" />
</startup>
这篇关于混合模式程序集是针对运行时的“v2.0.50727"版本构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文