Could not load file or assembly CrystalDecisions.CrystalReports.Engine
Asked Answered
D

7

9

My user's Terminal Runs 2 application. One of which I built an application using VS 2005 with Crystal Reports bundled version and another outside product which uses a different Crystal Report version. There were about 25 users who use the same combination but only one gives the the following error:

Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version = 12.0.2000.0, Culture=neutral, PublicKeyToken = 692fbea5521e1304' or one of its dependencies. The System cannot find the file specified.

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

********** Exception Text ********** System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. File name: 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' at Com.Isi.Client.OMSClient.CrystalReportViewer.LoadRuntime() at Com.Isi.Client.OMSClient.Program.LoadCrystalReportRuntime() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

********** Loaded Assemblies ********** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- AT Assembly Version: 4.30.29.0 Win32 Version: 4.30.29.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/AT.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- Com.Isi.Client.OMSClient.Core Assembly Version: 4.30.29.1 Win32 Version: 4.30.29.1 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Client.OMSClient.Core.DLL ---------------------------------------- Com.Isi.Common.Shared Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Common.Shared.DLL ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Syncfusion.Shared.Base Assembly Version: 6.403.0.15 Win32 Version: 6.403.0.15 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Syncfusion.Shared.Base.DLL ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Com.Isi.Client.ClientUtils Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Client.ClientUtils.DLL ---------------------------------------- Com.Isi.Common.Tools Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Common.Tools.DLL ---------------------------------------- Com.Isi.Client.ODCConnection Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Client.ODCConnection.DLL ---------------------------------------- Com.Isi.Client.Trade.TradeService Assembly Version: 2.2.0.0 Win32 Version: 2.2.0.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Client.Trade.TradeService.DLL ---------------------------------------- Com.Isi.Client.Interfaces Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Client.Interfaces.DLL ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Com.Isi.Common.Controls Assembly Version: 4.30.24.0 Win32 Version: 4.30.24.0 CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Com.Isi.Common.Controls.DLL ---------------------------------------- Syncfusion.Tools.Windows Assembly Version: 6.403.0.15 Win32 Version: 6.403.0.15

CodeBase: file:///C:/Program%20Files/DirectFN/DirectFN%20Admin%20Terminal/Syncfusion.Tools.Windows.DLL

********** JIT Debugging ********** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

Investigation reveals that in user's GAC, I found 2 versions of Crystal Report's CrystalDecisions.CrystalReports.Engine which are: 13.0.2000.0 10.2.3600.0

This is the same combination I found in other users' GAC. What triggers me the portion of the error which says "The System cannot find the file specified". Indeed there were no files specified under the version, but how come other users were using it. What is wrong?

Decumbent answered 11/3, 2013 at 12:39 Comment(0)
U
5

Try with installing SAP Crystal Reports runtime engine for .NET Framework. It works for me.

Upwind answered 5/7, 2013 at 6:51 Comment(0)
P
3

Here is one reason I got the error. I installed Crystal reports 11 version and the assembly in the GAC is 11.0.3300.0 (To check the version installed in your machine Windows+R => assembly). Screenshot/link below shows the version installed on my machine.

enter image description here

But in web.config of my code that I obviously checked out from my server is looking for crystal reports version 13.0.2000.0.

Solution: Renamed the version, PublickeyToken as per the installed crystal Reports version in my web.config. and this made my code running.

Penzance answered 11/3, 2016 at 21:12 Comment(0)
M
2

Check out this post on when the GAC vs BIN folder gets used. It sounds possible that the other users have it in their bin folder. I'd start by checking there. Or in this case, I might start by putting it there and see if the problem is resolved, since you have a user that cannot work right now.

Mathes answered 11/3, 2013 at 12:49 Comment(1)
this post gave an idea to solve the problem. I basically installed CR Runtime again and it worked.Decumbent
F
2

I know this is an old question, but it was never answered, and I think this might help. I have seen this issue with using crystal reports while compiling in .NET Framework 4.0 or later. To fix it you have to add an app.config file to your project and put in an entry that tells the framework to use the legacy loader. See Crystal Reports are not working in Visual Studio 2010

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
Fortification answered 24/9, 2014 at 22:34 Comment(0)
B
1

Hey I was also having this problem. In windows 7 vs2010 , But i installed this SAP Crystal Reports, developer version for Microsoft Visual Studio Updates & Runtime from this site now its working fine. Link is mentioned below

http://scn.sap.com/docs/DOC-7824

Bouillabaisse answered 5/7, 2013 at 4:51 Comment(0)
O
1

I had the same problem. The first line of the exception message is indicating that your project is looking for Version = 12.0.2000.0.

Whenever I attempted to rebuild, messages in the Output window of Visual Studio (2015) indicated the same problem and prompted me to look at the preview.aspx file (C:\Windows\Microsoft.NET\Framework\v4.6.81\ASP.NETClientFiles\crystalreportviewers13\preview.aspx).

In my case, I simply changed the references from 12.0.2000.0 to 13.0.2000.0 (the version in the GAC).

Problem Solved.

Hope that helps!

Oversell answered 1/11, 2016 at 20:39 Comment(0)
D
0

Here is working solution tested!

  1. you need to go here https://www.sap.com/cmp/td/sap-crystal-reports-visual-studio-trial.html there, you need to register they will send you link to download

  2. link to download it will look like this:

enter image description here

select either "SAP Crystal Reports for Visual Studio (SP27) runtime (64-bit)" or "SAP Crystal Reports for Visual Studio (SP27) runtime (32-bit)" depending on your machine.

download and install, close your VS before installation, and reopen VS and recompile it, the error will be gone!

  1. the download file name in my case is this:

enter image description here

Done!

Dogfight answered 24/6, 2020 at 21:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.