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 :
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.
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>
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.
Just one thing, maybe useful for someone: for use Crystal Reports in VS 2010, you have to use Framewok 4.0 (not Framewok 4.0 Client Profile)
You can create a folder called "dotnet1" in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 and copy the dll crdb_adoplus.dll in it. this solution worked for me.
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 :
I changed it back to 4.0 (It generated app.config) then compile it, It automatically added following code:
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.