Search code examples
msbuildmsbuild-taskbootstrapper

Windows Installer XML (WiX)


My application needs .Net Framework 3.5, Crystal Report 10.5 and SQLServer Express 2005 as pre-requisites. For this purpose I created a wix setup project and added the msbuild task for prerequisites. My current problem When installing the kit to an user machine, crystal report trying to install before .net framework 3.5. How can I change the order of the prerequisites?

My current msbuild task code is given below;

  <ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5">
  <ProductName>.NET Framework 3.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
  <ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="BusinessObjects.CrystalReports.10.5">
  <ProductName>Crystal Reports Basic for Visual Studio 2008 (x86, x64)</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Sql.Server.Express.9.2">
  <ProductName>SQL Server 2005 Express Edition SP2 (x86)</ProductName>
</BootstrapperFile>

  <Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" 
ApplicationName="Business Software" 
BootstrapperItems="@(BootstrapperFile)" 
ComponentsLocation="Relative" 
CopyComponents="True" 
OutputPath="$(OutputPath)\en-us\" 
Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" />


Solution

  • This problem is rectified by replacing the DependsOnProduct tag in CrystalReports10_5\products.xml as follows

      <RelatedProducts>
    <!--<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />-->
    <DependsOnProduct Code="Microsoft.Net.Framework.3.5.SP1" />