Alex Rivera | Logout

A complete WiX 3.6 bundle example bootstrapping a .NET 4 Client Profile

Asked 2012-01-26T16:11:38.790
28

I tried to construct a working example of a WiX 3.6 installation script. We currently use WiX 3.5 and now we would like to begin installing the .NET 4 Client Profile framework as a pre-requisite for our MSI file that our product.wxs script creates. WiX 3.6 seems like the best way forward.

Is there a functional example of how to do this with WiX 3.6?

Here is our 3.5 script we use today:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

    <!-- Version change handling -->
    <?define UpgradeCode="###############################"?>
    <?ifdef env.BUILD_NUMBER ?>
    <?define ProductVersion="2.6.$(env.BUILD_NUMBER).0"?>
    <?else ?>
    <?define ProductVersion="2.6.0.0"?>
    <?endif ?>

    <Product Id="*" Name="###############################" Language="1033" Version="$(var.ProductVersion)" Manufacturer="###############################" UpgradeCode="$(var.UpgradeCode)">
        <Package InstallerVersion="200" Compressed="yes" />

        <!-- Custom actions for this installer -->
        <Binary Id="###############################.dll" SourceFile="..\..\Libraries\###############################.CA.dll" />

        <!-- Kill ##### before installation begins -->
        <CustomAction Id="Kill#####ActionId" BinaryKey="###############################.dll" DllEntry="Kill#####Action" Execute="immediate" Impersonate="yes" Return="check" />
        <InstallExecuteSequence>
            <Custom Action="Kill#####ActionId" Before="InstallInitialize" />
        </InstallExecuteSequence>

        <!-- ADD/REMOVE Programs icon -->
        <Icon Id="
Edit
Report

3 Answers

19

Heath Stewart's Introducing Managed Bootstrapper Applications provides a basic example in his blog.

answered 2012-03-17T14:37:19.723
4

You need to create a separate WiX bootstrapper project. See Building Installation Package Bundles in the WiX 3.6 documentation.

answered 2012-02-15T21:26:24.863
2

Once you have your bootstrapper, all you need to do is:

  1. Add a reference to the file WixNetFxExtension.dll into your bootstrapper / managed bootstrapper application project.

  2. Add the following as the first item in your chain.

    <PackageGroupRef Id="NetFx40Web"/>
    

That's it. Further information and options are in the WixNetfxExtension documentation.

answered 2013-03-20T14:33:23.033

Your Answer