Crystal Reports Exception

I am developing an application that uses SAP Crystal Reports for reporting using Visual Studio 2013 Professional. I downloaded and installed the package from the SAP site, install it. The report was prepared using the wizard (this works correctly). The problem is that I follow the step in the source code:

myCrystalReport.SetDataSource(myDataSet); 

myDataSet is populated with the required data. Error displayed:

An unhandled exception of type "System.IO.FileNotFoundException" occurred in mscorlib.dll

Additional information: Failed to 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.

During installation, the dotnet1 folder was not created. There is only a dotnet folder. Does anyone know how to solve this problem?

Thanks.

+8
c # crystal-reports
source share
4 answers

I had the same problem. My solution was to add this xml to the app.config file at the <configuration> level:

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

See also :

+32
source share
 <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> </startup> </configuration> 

Due to a build change in mixed mode, this problem occurs, so it is recommended that you use the above code in the app.config file.

+5
source share

you use the code below in app.config, and you must also set the .net profile 4 client.net profile 4 or 4.5 for the project property for the client.

 <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> 
+2
source share

All of the above solution does not work in my project, and the application goes into interrupt mode. I solve this problem by adding the following lines to app.config inside the configuration.

 <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" /> </startup> 
0
source share

All Articles