Skip to Content
0
Jun 01, 2017 at 12:37 PM

SAP Crystal Reports with Visual Studio 2017: Problem with Windows Installer

1586 Views Last edit Jun 01, 2017 at 07:30 AM 2 rev

We are using SAP Crystal Reports in our application. We use Windows Installer for the Setup project. In the past, we used Visual Studio 2010. With the same settings as we used now, the Setup program created with Visual Studio 2010 always checked whether the required version of SAP Crystal Reports was installed, and if not, it automatically installed it before installing our actual application.

This no longer works with Visual Studio 2017. The Setup program only installs our application without checking whether SAP Crystal Reports is installed or not. Therefore, if SAP Crystal Reports is not installed, it just installs our application and when we start it, we get an error message.

I checked Setup project -> Properties -> Prerequisites in Visual Studio 2017 and noticed that there is a Warning sign next to "SAP Crystal Reports Runtime Engine for .NET Framework". When I move the mouse over it it says that "Prerequisite could not be found for bootstrapping".

In Visual Studio 2010 this warning message is not displayed.

The product.xml which we use for the 32-bit version of SAP Crystal Reports has the following content:

<?xml version="1.0" encoding="utf-8" ?> 

<Product
  xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
  ProductCode="SAP.CrystalReports14.NET.2.0.32"
>
  <!-- Defines list of files to be copied on build -->
  <PackageFiles>
    <PackageFile Name="CRRuntime_32bit_13_0_13.msi" 
      HomeSite="http://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_32bit_13_0_13.msi" 
      PublicKey="3082010a0282010100c7f9c70fcfa3f3a43aa198b27cb818ed7fe30f1be2e64dd2c50890de5224849a69e7004fb272d62ea9fd682ec47674f59d42165394fe6659846e3f610ba7fb4106ca5de6e54b3bf565e8e203e1a37cf7b98f0bc6bab725143a38932f70823ebcad298c4bbc1a8da93266122e701b85f3609b4e22439c4d31640ca20d738833b0212e2ce1427b96e40a3fd1957c63f355b16f1aee813a18db9129fdf5d29f195818223400d25bc8da1d3c769a69a9db4ac65d85f1c2d9385f2ff3a662cb9bb782c9b1b3fc4757b3d183022cc510a31c2d30d7c6729e5e8c8f3c6eaaba82742cd164b8aad37fdfb23d3f5f0407776b45bf633ddbc1c906553c55a9ddfe4bc412950203010001"/>
  </PackageFiles>

  <RelatedProducts>
    <DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
    <DependsOnProduct Code="Microsoft.Data.Access.Components.2.8" />
  </RelatedProducts>

  <InstallChecks>
    <RegistryCheck Property="CRRuntime32Version" Key="HKLM\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports" Value="CRRuntime32Version" /> 
  </InstallChecks>

  <Commands Reboot="Defer">
    <Command PackageFile="CRRuntime_32bit_13_0_13.msi"
         Arguments='/qf' 
         EstimatedInstalledBytes="80000000" 
         EstimatedInstallSeconds="240">

      <!-- These checks determine whether the package is to be installed -->

      <InstallConditions>
        <!-- Comment out the below BypassIf entry if you want install the 32bit version CRRuntime redist in the target machine -->      
        <!-- ByPass if the Processor is not x86 -->
        <!-- BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/ -->

        <!-- ByPass if the installed version is same or higher --> 
        <BypassIf Property="CRRuntime32Version" Compare="VersionGreaterThanOrEqualTo"  Value="13.0.13"/>
        
        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>

        <!-- Block install on Win95 -->
        <FailIf Property="Version9x" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>

        <!-- Block install on NT 4 or less -->
        <FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>

      </InstallConditions>

      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1641" Result="SuccessReboot"/>
        <ExitCode Value="3010" Result="SuccessReboot"/>
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
      </ExitCodes>

    </Command>
    
  </Commands>
</Product>


The product.xml for the 64-bit version is analogous.

Is it possible to fix this problem somehow and create a correctly working Setup program with Visual Studio 2017?

Thank you in advance for your answers.