Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in Crystal Report: could not load file or assembly file' '

in my project i use visual studio 2010,crystal report 2010 & Crystal.Reports.2010.Support.Pack.v13.0.5. when i run code's and call crystal report viewer. this error Occurred in my windows application. how can i solved this error in c# win App ?

Error :

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. The system cannot find the file specified.

like image 438
Amin Avatar asked Jun 07 '14 07:06

Amin


People also ask

Could not load file or assembly Crystal reports?

What causes this error? This error happens when the SAP Crystal Reports Runtime installed dependency does not match the version required by Crystal Delivery. This can happen if you upgrade Crystal Delivery, but did not update the runtime or if you previously have an older version of Crystal Reports Runtime.

Could not load file or assembly in sap?

This error indicates that the client machine running the add-on does not have the Crystal report Runtime installed. Please go to the SAP Installation Files and install the Crystal Report Runtime.


2 Answers

I think you require this code, add it into your web.config

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

Pretty sure this is on google, it maybe a duplicate (will search after answering)

EDIT:

You may have to edit your .Net setting within your build configuration. Maybe try uninstalling the crystal assemblies - set .Net 4 and reinstall (assuming you weren't already on .Net 4) – n34_panda yesterday

like image 80
n34_panda Avatar answered Sep 18 '22 17:09

n34_panda


It's working for me.

I added the App.config file to my application (window) and then added the below tag inside the configuration tag.

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
like image 41
yogesh Avatar answered Sep 18 '22 17:09

yogesh