views:

1645

answers:

2

I am refactoring an old program to use VS2008 (instead of VS2005) and the 2003 Crystal Reports merge modules no longer work on the client machine.

I am using the CR version bundled with VS2008. Neither the CR10 merge modules downloaded from the SAP site work, nor the CR x86 msi.

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

I have Googled this error to death, and can only find pleas for help with this exact error...

+1  A: 

Your application is clearly keeping references to the CR10 version of Crystal - you need to update these to the newer versions. You can do this by double-clicking on My Project, selecting References, removing the existing Crystal ones (which probably say version 10.2.3600.0 next to them) and replacing them with the matching 11.5 versions. I suggest adding the new ones first, then removing the old ones - that way you can keep track. As long as the functionality you're using hasn't been removed from the newer version (which is unlikely), it'll work fine. After that, you'll be able to use the merge modules included with VS2008 to deploy Crystal.

CodeByMoonlight
Upgrading crystal reports.... The very idea frightens me ;-)
calico-cat
Just the application references - no need to touch the reports themselves.
CodeByMoonlight
+1  A: 

I've been able to figure it out... finally. (CR experts...please correct me if I've missed details or gotten them wrong)

The fact that Business Objects was purchased by SAP in 2007 was a major roadblock to the answer. The vast majority of forum links point to the old Business Objects website, and are no longer available (SAP has decided to unhelpfully point 90% of these to their home page). This vastly reduced the helpfulness of such posts.

The first source of my confusion was that the version of Crystal Reports that I was dealing with was Crystal Reports BASIC 2008. This is the version bundled with Visual Studio 2008. Versions 11 and 12 are standalone and were NOT what I was looking for.

I had tried using MSMs (packaged DLLs) and msi (runtime installer) for Crystal Reports 2008 (the standalone version) and this is why it didn't work. I had also tried bundling "Crystal Reports" with the installation by using Prerequisites in my setup program. No luck.

  1. I had first tried moving the DLLs from C:\Program Files\Common Files\Business Objects\2.7\Managed to the BIN directory of my application (or told VS2008 to include them in the bin directory at compile time). It then couldn't find crystaldecisions.reportappserver.commlayer, and no amount of copying and pasting DLLs could fix this.
  2. I then navigated the Global Assembly Cache (c:\WINDOWS\assembly) and noticed that on my development machine, the DLLs were available in the correct version, but were not on the client machine (copying them to the bin folder via DOS gave a version/licensing error).
  3. I then found a hard-to-find zip file that contained the version I needed - but it was the bundle for VS2005! I ended up using the msm file located in cr_net_2005_mergemodules_mlb_x86.zip. I also changed my compilation option from "Any CPU" to "x86". Not sure if this helped as well, but it works now.

So that was my ordeal. Hopefully this helps someone else!

calico-cat