CrystalReport 和/或 Visual Studio 2010 的情况非常奇怪,我不知道可能是 .Net Framework

Very Odd situation with CrystalReport and/or Visual studio 2010 I don#39;t know maybe .Net Framework(CrystalReport 和/或 Visual Studio 2010 的情况非常奇怪,我不知道可能是 .Net Framework)
本文介绍了CrystalReport 和/或 Visual Studio 2010 的情况非常奇怪,我不知道可能是 .Net Framework的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个很奇怪的问题,看起来很有趣,好像有些东西跟我很开心.我正在使用 Crystal-Report 版本 13.0.2000.0 和 Visual Studio 2010.几天前我收到了与 Crystal-Report 相关的错误,即:

I faced a very odd problem It seems very funny looks like some stuffs having a fun with me. I'm using Crystal-Report Version 13.0.2000.0 and Visual Studio 2010. Number of days ago I got a error related with my Crystal-Report, that was :

无法加载文件或程序集 'file:///C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86dotnet1crdb_adoplus.dll' 或其依赖项之一.系统找不到指定的文件.

Could not load file or assembly 'file:///C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86dotnet1crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.

谷歌搜索后,我发现 解决方案, 然后我在 app.config 文件中添加了以下代码,它运行良好,我没有错误,没有异常.

After googling I found solution, Then I added the following code to app.config file and It worked well, I had no error, no exception.

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

今天,当我想在我的另一个项目中使用相同的解决方案时,它显示了我应该下载 .NetFrwamework 4.0 的消息,它会导致项目无法运行.我以为我在配置中遗漏了一些东西,所以我去看看我在之前的项目中做了什么配置.有趣的一点是,当我打开项目时,它向我显示了下载 .NetFramework 4.0 的相同消息,而它在几天前运行良好,我对此没有任何问题.但现在 .... .

Today when I wanted to use same solution in my other project it showed the message that I should download .NetFrwamework 4.0 and It causes project to not run. I thought I missed something in configuration so I went to look exactly what configurations I did in previous project. Interesting point is here when I opened the project it shows me same message to download .NetFramework 4.0, while It worked very well number of days ago and I don't have any problem with that. But now .... .

我不知道是什么问题.任何建议都会有所帮助.

I don't know what is the problem. Any advice will be helpful.

推荐答案

花了好几个小时解决了我的问题,不知道怎么解决的?!!但它不再抛出任何异常.我做过的事情:

After spent many hours, I solved my problem, I don't have any idea how ?!! but It doesn't throw any exception anymore. Things I've done :

  1. 我删除了 app.config.
  2. 我将框架更改为 3.5,然后编译它.
  3. 删除 AppData/Local/Temp/ 文件夹中所有与项目相关的文件 (Windows 7).
  4. 我把它改回4.0(它生成app.config)然后编译它,它自动添加了以下代码:

  1. I delete app.config.
  2. I changed framework to 3.5 then compile it.
  3. Delete all related files with project in AppData/Local/Temp/ folder (Windows 7).
  4. I changed it back to 4.0 (It generated app.config) then compile it, It automatically added following code:

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

我运行我的应用程序没有任何错误和异常.我不知道是什么问题,但通过执行这些步骤,我解决了我的问题.

I ran my application without any error and exception. I don't know what was the problem but by doing these steps I fixed my issues.

这篇关于CrystalReport 和/或 Visual Studio 2010 的情况非常奇怪,我不知道可能是 .Net Framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)