简体   繁体   English

在C#中从vs2008迁移到vs2012的水晶报表上,未找到文件异常未处理

[英]file not found exception was unhandled on crystal report migrating from vs2008 to vs2012 in c#

I am trying to open VS2008 version application in VS2012, while running the application where it has to generate crytal report it gives an error: 我试图在VS2012中打开VS2008版本应用程序,而在运行该应用程序时必须生成晶体报告,却给出错误:

Could not load file or assembly 'file:///C:\\Program Files\\SAP BusinessObjects\\Crystal Reports for .NET Framework 4.0\\Common\\SAP BusinessObjects Enterprise XI 4.0\\win32_x86\\dotnet1\\crdb_adoplus.dll' or one of its dependencies. 无法加载文件或程序集'file:/// C:\\ Program Files \\ SAP BusinessObjects \\ Crystal Reports for .NET Framework 4.0 \\ Common \\ SAP BusinessObjects Enterprise XI 4.0 \\ win32_x86 \\ dotnet1 \\ crdb_adoplus.dll'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

I can see the crystal report its fine. 我可以看到水晶报告的罚款。 I already made changes in appconfig file : 我已经在appconfig文件中进行了更改:

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

So please advice. 所以请指教。 Thanks 谢谢

Modify all of your app.config.(if more than one) 修改所有app.config。(如果不止一个)

Before 之前

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

After

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

Make sure you have correct version of Crystal Runtime for .NET Framework or VS 2012 on your machine or your server where you are testing your app. 确保在要测试应用程序的计算机或服务器上具有适用于.NET Framework或VS 2012的Crystal Runtime版本。 Simply changing the configuration will not help. 仅仅更改配置将无济于事。 You can download latest runtime for VS here: SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads 您可以在此处下载VS的最新运行时: SAP Crystal Reports,Microsoft Visual Studio的开发人员版本:更新和运行时下载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM