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

Posted on 2009-04-18
Last Modified: 2012-05-06
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. 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.  
Question by:davidcahan
    LVL 7

    Expert Comment

    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
    LVL 100

    Accepted Solution

    Check this tutorial on using Crystal with VS2005.  Starting on pagge 434 are tutorials for building an install package for various scenarios

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now