Home » Visual StudioRSS

Installing Crystal Reports Basic for VS 2008 with ClickOnce

I have an existing application authored and published to ClickOnce from VS 2008.  The application is marked to x86 (not 'Any CPU') as I'm needing to publish to both x86 and x64 machines but I only want to publish a 32-bit compiled version.  It should run fine on both types of machines then.  Since I utilize Crystal Reports, I have it checked in the Prerequisites area of the 'Publish' tab.

On 32-bit OS machines everything works fine.  On 64-bit OS machines it does not.  It seems that the Crystal installer will automatically install their 64-bit version on 64-bit machines and their 32-bit version on 32-bit machines.  You'd think this would make sense, but as the rest of the app is built for x86, it throws an error when I attempt to launch CR 64-bit reports on those x64 machines.  Error:  Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required.

I already know the 'long' workaround.  If I go to Control Panel and uninstall the x64 version of CR (that was automatically installed) and then I install the x86 version of CR manually.  Presto, it works.

Therefore, my question is, how do I get VS 2008 ClickOnce to automatically install the x86 version of CR Basic for VS 2008 and not to install the flavor it prefers when it autodetects the OS type?  In the Prerequisites tab I could deselect the CR option's checkbox, but then how can I add my own preferred x86 .msi to the ClickOnce install?

Any help that could be provided would be hugely helpful.  Thanks in advance.
-Greg 

 

3 Answers Found

 

Answer 1

Hi,

I had the same issue and I found a workaround. I'm not proud of it but it does the job.

So, the solution can be summarized like this:

0. Open the path C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5  -> you'll find the two redistributable packages CRRedist2008_x64.msi and CRRedist2008_x86.msi plus product.xml (which seems to be something like a config file).

1. Open the product.xml file and search for Commands tag. It contains two Command tags.

2. Go to the Command tag for CRRedist2008_x86.msi and have a look to InstallConditions tag.

3. Comment the following line:
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
As the comment above the line says, if you install the application on a x64 machine it will NOT install the 32 version of Crystal Reports.

4. Deploy your application.

I hope this helps you.

Regards,
Costin


 

Answer 2

Hi,

I had the same issue and I found a workaround. I'm not proud of it but it does the job.

So, the solution can be summarized like this:

0. Open the path C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5  -> you'll find the two redistributable packages CRRedist2008_x64.msi and CRRedist2008_x86.msi plus product.xml (which seems to be something like a config file).

1. Open the product.xml file and search for Commands tag. It contains two Command tags.

2. Go to the Command tag for CRRedist2008_x86.msi and have a look to InstallConditions tag.

3. Comment the following line:
<BypassIfProperty="ProcessorArchitecture"Compare="ValueNotEqualTo"Value="Intel"/>
As the comment above the line says, if you install thesoftware on a x64 machine it will NOT install the 32 version of Crystal Reports.

4. Deploy your application.

I hope this helps you.

Regards,
Costin



Thanks for your guide. It works for me!
 

Answer 3

There are 2 Command tags for  CRRedist2008_x86.msi.

1) Arguments = '/norestart'

2) Arguments = '/norestart REINSTALL= all REINSTALLMODE=vomus'

In which section should I comment the following line? <BypassIfProperty="ProcessorArchitecture"Compare="ValueNotEqualTo"Value="Intel"/>
Or both?

Thanks in advance.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter