Could not load file or assembly CrystalDecisions.ReportAppServer.ClientDoc

Go To


I've looked at similar questions on SO, but nothing quite matches my issue as far as I can tell.

The exception message:

Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

The file is in my GAC. I am developing on a 32 bit machine (Windows 7) running VS2010, everything is .NET4. The target hosting machine is 64-bit Win 2008 R2. My local machine has the CR installation for VS2010; the hosting machine has the 64-bit runtimes for VS2010. I am compiling all my code in "Any CPU" mode for this web application.

It is blowing my mind that it cannot find the file in the GAC. This is an IIS application; is there some sort of permissions issue? I would think IIS would have access to the GAC.

Some suggestions of what to do would be appreciated.

2012-04-03 21:00
by Jeremy Holovacs
In several third party dlls I've worked with, the PublicKeyToken is different for the 32-bit and 64-bit versions. If it works on one machine, but not the other, this may be someplace to look. it's just a guess, though.. - David 2012-04-03 21:04
Well the file with that public key token exist in the GAC, exactly as described. I don't understand why my web application cannot find it - Jeremy Holovacs 2012-04-03 21:08


It turns out the answer was ridiculously simple, but mystifying as to why it was necessary.

In the IIS Manager on the server, I set the application pool for my web application to not allow 32-bit assemblies.

It seems it assumes, on a 64-bit system, that you must want the 32 bit assembly. Bizarre.

2012-04-04 14:26
by Jeremy Holovacs
Or alternatively: C:\inetpub\AdminScripts\adsutil.vbs SET w3svc/AppPools/Enable32bitAppOnWin64 - ariscris 2015-06-30 16:54
My case was a WPF Application. Had to disable "32-bit Preference" option in Project's preferences - RonaldPaguay 2018-02-28 18:13


1) Change your .net profile from Client profile to to .Net Framework 4.0

2) Check your Embed Interop Types flag

Embed Interop Types flag

2012-04-03 22:50
by Micah Armantrout
All my projects use the 4.0 profile already; I've never had much success with the client profile (dunno why that's a default for any project). I will check the Interop settings tomorrow morning - Jeremy Holovacs 2012-04-04 02:15
All of my references are already set to not embed Interop Types - Jeremy Holovacs 2012-04-04 12:27
ah sorry worth a tr - Micah Armantrout 2012-04-04 14:47


Regarding the 64-bit system wanting 32-bit support. I don't find it so bizarre:

Although deployed to a 64-bit system, this doesn't mean all the referenced assemblies are necessarily 64-bit Crystal Reports assemblies. Further to that, the Crystal Reports assemblies are largely just wrappers to a collection of legacy DLLs upon which they are based. Many 32-bit DLLs are required by the primarily referenced assembly. The error message "can not load the assembly" involves these DLLs as well. To see visually what those are, go to and run 'Depends' on the assembly in question, directly on that IIS server.

2012-04-07 04:40
by Dylan - INNO Software


You simply need to install Crystal Report Report Run Time downloads on Deployment Server. If problem still appears, then place check asp_client folder in your project main folder.

2015-07-14 12:14
by ZahidKakar
It should works without having to install the runtime. What is the solution when running your website on cloud server and you don't have access to desktop? What about unit testing - Bastien Vandamme 2017-09-06 10:25