Link to home
Start Free TrialLog in
Avatar of davidcahan
davidcahanFlag for United States of America

asked on

Crystal Reports: Difference between adding a reference to Assembly and adding dll's

This issue is a bit convoluted but i will try to explain.  It took me 2 seconds to get crystal reports up running and able to be called from my app on my development box.  When i moved to production, it took a while to get it working.  Finally we resorted to installed VS2005 on the box and then it worked.  Recently, I reinstalled the OS on my dev box to a 64 bit system.  Suddenly crystal wasn't working.  I was getting this error on any page in my app that referenced it:

 Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Normally, with Crystal it would have taken hours to figure this out.  But lo and behold, I just deleted the dll's from the bin folder and added a reference (via right clicking on the solution name ) to all the cyrstal 10.5 GAC assemblies.  Great...my app works again on my development box.

so here's the problem....Can i just rebuild my site and move the entire thing up to production and it will work?  I'm kind of thinking it isn't going to.  And I really don't want one version up on the production box that uses dll while my local copy uses references.  
Avatar of meispisces
meispisces
Flag of India image

Hi,davidcahan
I also faced same error.. The scenario is that, at your PC, when you do locally a project, a crystal report runs because in your local PC those assemblies files are added into your Global Assembly Cache (C:\Windows or C:\Program Files -- i dont remeber now). But when you run report at your server/production site it fails as it doesn't find those dlls.. In your case the catch is you are running VS 2005 and may be production server has VS 2005 not supporting CR or its earlier version like VS 2003 or even 2001. Your report would had work even if you didn't install CR as you could have only install Redistriuable for CR 2005/VS 2005 which would have automatically install CR's dll..
Do respond
thanks
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial