与CrystalReport和/或Visual Studio 2010非常奇怪的情况我不知道,也许.Net框架我不、框架、奇怪、情况

2023-09-04 02:14:46 作者:无声告别

我面临一个很奇怪的问题,这似乎很可笑貌似有些东西有与我的乐趣。 我使用水晶报表版本13.0.2000.0和天前的Visual Studio 2010中数我与我的水晶报表相关的一个错误,那就是:

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 :

无法加载文件或程序集文件:/// C:\ Program Files文件(x86)的\ SAP的BusinessObjects \ Crystal报告用于.NET Framework 4.0 \公用\ SAP BusinessObjects Enterprise的XI 4.0 \ win32_x86 \ dotnet1 \ crdb_adoplus.dll 或它的某一个依赖。该系统找不到指定的文件。

Could not load file or assembly 'file:///C:\Program Files (x86)\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. The system cannot find the file specified.

谷歌上搜索,我发现解决方案后,然后我说了下面code到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的消息,它会导致项目无法运行。我想我错过了一些在配置让我去看看到底是什么配置,我在previous项目一样。有趣的一点是这里的时候,我打开它表明我同样的信息下载.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 :

在我删除的app.config。 我改变了框架3.5,然后编译它。 删除应用程序数据/本地/温度/ 文件夹中的所有项目相关文件(Windows 7)。

我改回4.0(它产生的app.config),然后编译它,它会自动添加以下code: I delete app.config. I changed framework to 3.5 then compile it. Delete all related files with project in AppData/Local/Temp/ folder (Windows 7).

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.