错误:混合模式程序集是针对运行时的版本'v2.0.50727'构建的... [英] Error: Mixed mode assembly is built against version 'v2.0.50727' of the runtime...

查看:73
本文介绍了错误:混合模式程序集是针对运行时的版本'v2.0.50727'构建的...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Google上进行了搜索,但是找不到有关此问题的任何解决方案.
它为我提供了项目解决方案,但我已经在App.config中完成了该操作

我的问题是所部署的软件.

错误:
----------------

I have already searched on Google but I cannot find any solution regarding this problem.
It gives me solution for project but I have already done that in App.config

My problem is with the deployed software.

ERROR:
----------------

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.   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)


--------------------------------------------
如上所述,我遇到了错误.实际上我已经添加了


--------------------------------------------
I got error like as I mentioned above. Actually I have already added

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


---------------------------------------------
在我的app.config文件中.项目在调试模式下可以正常运行,但是在已部署的软件中无法运行,当我运行软件并打开Crystal报表时,会出现此错误.

任何想法请帮忙.


---------------------------------------------
In my app.config file. project is working fine in debug mode but it is not working in deployed software, when I run my software and open crystal report form, I get this error.

Any idea please help.

推荐答案

您的Crystal DLL似乎与.NET Framework 4.0不兼容.

错误表明,尽管您尝试在Framework 4.0上运行应用程序,但仍然有一些东西试图引用Framework 2.0.
确保所有使用的dll和项目都在Framework 4.0上使用/正在运行.

在IIS中,一旦您托管/部署它,为它选择的框架就是4.0
It looks like your Crystal DLL is not .NET Framework 4.0 compatible.

Error says that something is still trying to refer Framework 2.0 though you are trying to run the application on Framework 4.0.
Make sure that all the dll''s used and the projects are using/running on Framework 4.0.

In IIS, once you host/deploy it, the Framework selected for the same is 4.0


可能是您所引用的dll之一实际上正在运行旧版本.这台特定的机器.
It could be that one of the dll''s you are referencing is actually running an older version on this particular machine.


这篇关于错误:混合模式程序集是针对运行时的版本'v2.0.50727'构建的...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆