Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a PC Windows Application that I deploy with ClickOnce. My app started out as a small app with Micrsoft Access as the database, so that users didn't have to install a big database package when they first use it. Because of the Access Database, I have it set to compile the app to x86 (otherwise when it's installed on an x64 machine it can't find the Jet Engine.)

The problem I'm having now is that my application also uses Crystal Reports. I use the Prerequisites window on the Publish Tab of my project's properties to have this included when the user installs. When a user with an x64 machine installs my application, it installs Crystal Reports for x64. When they run the app (which is compiled for x86) it looks for the Crystal Reports x86, can't find it, and blows up with the message "An error has occurred while attempting to load the Crystal Reports runtime" etc. If the user manually installs the x86 version of Crystal Reports the application then works just fine.

So my question is...is there anyway to force an x64 machine to install the x86 version of Crystal Reports?

...and No, I cannot change it to a different database. The app started out small but has grown quite large and changing the database would be too painful at this point.
Posted

Have you already tried including http://resources.businessobjects.com/support/communityCS/FilesAndUpdates/CRRedist2008_x86.zip[^] to the package?

Could be that you have to make separate publishes for x86 and x64 installations to handle the different versions.
 
Share this answer
 
Comments
Kschuler 11-Aug-11 17:31pm    
I have never included something without using the Prerequisits menu on the Publish tab. Crystal Reports is an option to include from that menu, but it seems to be an install that decides if the user needs x86 or x64. I was hoping there was a way to still use this but force the x86 to be installed. I haven't really searched other ways to include a install as part of a ClickOnce publish.
Wendelius 11-Aug-11 17:37pm    
This is just a guess but even if you set the compiler option to x86 it won't affect the publishing for Crystal. The package may be the same for all platforms and the client side 'defines' which version it installs. For this reason it may be necessary to include only the x86 version to the package.
Kschuler 12-Aug-11 9:19am    
Yes. That is my question. How do I do that? I'm looking at this MSDN article:
http://msdn.microsoft.com/en-us/library/ms165429(v=VS.90).aspx
and it's saying I have to manually create a Product xml and Package xml but I am not finding a whole lot of help on HOW to do that. Do you know of any good tutorials or articles on the subject?
Wendelius 12-Aug-11 9:37am    
Have you checked this already?
http://msdn.microsoft.com/en-us/library/dd997001.aspx[^]
That way you could install the desired version of Crystal silently for example from a known path etc.
Kschuler 12-Aug-11 9:43am    
That appears to be for VS 2010. I am still using VS 2008.
I've been looking at the Bootstrapper Manifest Generator to help create my own custom prereq...but all the tutorials I find are very basic. Have you ever used it?
Using the Bootstrapper Manifest Generator download from here[^] and the product xml and package xml that is for the regular Crystal Reports bootstrap I muddled together a new bootstrap package that seems to work. I haven't fully tested it yet, so there could be plenty of problems with it.

I couldn't find a good tutorial on the Bootstrapper Manifest Generator and how to use all of the different inputs for and what they did or how they correspond to the final product and package xml documents. The best tutorial I found was this one:
http://jcrawfor74.wordpress.com/2008/02/27/bootstrap-manifest-generator-how-to-custom-pre-requisites/[^]

In case anyone is trying to accomplish the same, here is the product xml that I ended up with:

XML
<?xml version="1.0" encoding="utf-8"?>
<!--"Crystal.Reports.2008.x86.Only is the name I created for the bootstrap -->
<Product ProductCode="Crystal.Reports.2008.x86.Only" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
<!--I removed the public key to make this next line easier to read -->
    <PackageFile Name="crredist2008_x86.msi" HomeSite="http://resources.businessobjects.com/support/downloads/redistributables/vs_2008/redist/x86/CRRedist2008_x86.msi" PublicKey="key was here" />
  </PackageFiles>
  <RelatedProducts>
    <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
  </RelatedProducts>
  <InstallChecks>
<!--These MsiProductChecks I copied from the standard Crystal Reports 2008 product xml -->
    <MsiProductCheck Property="CRVSInstalled" Product="{AA467959-A1D6-4F45-90CD-11DC57733F32}" />
    <MsiProductCheck Property="CRVSRunTimex86Installed" Product="{CE26F10F-C80F-4377-908B-1B7882AE2CE3}" />
  </InstallChecks>
  <Commands Reboot="Defer">
    <Command PackageFile="crredist2008_x86.msi" Arguments="/norestart" EstimatedInstalledBytes="21000000" EstimatedInstallSeconds="300">
<!--These InstallConditions I copied from the standard Crystal Reports 2008 product xml -->
      <InstallConditions>
        <BypassIf Property="CRVSInstalled" Compare="ValueGreaterThan" Value="0" />
        <BypassIf Property="CRVSRunTimex86Installed" Compare="ValueGreaterThan" Value="0" />
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
        <FailIf Property="VersionNT" Compare="ValueLessThan" Value="5.00" String="InvalidPlatformWinNT" />
      </InstallConditions>
<!--These ExitCodes I copied from the standard Crystal Reports 2008 product xml -->
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="1641" Result="SuccessReboot" />
        <ExitCode Value="3010" Result="SuccessReboot" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900