在制作水晶报表时遇到此错误未处理System.IO.FileNotFoundException HResult=-2147024894

未处理System.IO.FileNotFoundException
  HResult=-2147024894
  Message=未能加载文件或程序集“file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll”或它的某一个依赖项。系统找不到指定的文件。
  Source=mscorlib
  FileName=file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll
  FusionLog==== 预绑定状态信息 ===
日志: 用户 = 702-01\Administrator
日志: Where-ref 绑定。位置 = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll
日志: Appbase = file:///d:/用户目录/Documents/Visual Studio 2012/Projects/水晶表2/水晶表2/bin/Debug/
日志: 初始 PrivatePath = NULL
调用程序集: (Unknown)。
===
日志: 此绑定从 LoadFrom 加载上下文开始。
警告: 将不在 LoadFrom 上下文中探测本机映像。仅在默认加载上下文中探测本机映像,例如,使用 Assembly.Load()。
日志: 正在使用应用程序配置文件: d:\用户目录\Documents\Visual Studio 2012\Projects\水晶表2\水晶表2\bin\Debug\水晶表2.vshost.exe.Config
日志: 使用主机配置文件: 
日志: 使用 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config 的计算机配置文件。
日志: 尝试下载新的 URL file:///C:/Program Files (x86)/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win64_x64/dotnet1/crdb_adoplus.dll。


  StackTrace:
       在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       在 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
       在 System.Reflection.Assembly.LoadFrom(String assemblyFile)
       在 CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)

  InnerException: 

解决方案:

App.Config里面有一段,对Runtime的设置

原:

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

修改为:

        <startup useLegacyV2RuntimeActivationPolicy="true">

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


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值