teynon
teynon

Reputation: 8318

WiX .NET45 Bootstrapper

I'm trying to included .NET 4.5 with my application. I've followed the instructions at VS2012 and Wix 3.6 - Installing .Net 4.5 with my application and the sub link from that http://wixtoolset.org/documentation/manual/v3/bundle/

I've managed to get it to build, but the installer immediately reports This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.

The log file shows this:

> === Verbose logging started: 1/14/2014  8:32:10  Build type: SHIP UNICODE 5.00.7601.00  Calling process: C:\Windows\system32\msiexec.exe
> === MSI (c) (5C:D4) [08:32:10:909]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
> 
> MSI (c) (5C:D4) [08:32:10:909]: Font created.  Charset: Req=0, Ret=0,
> Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
> 
> MSI (c) (5C:B0) [08:32:10:920]: Resetting cached policy values MSI (c)
> (5C:B0) [08:32:10:920]: Machine policy value 'Debug' is 0 MSI (c)
> (5C:B0) [08:32:10:920]: ******* RunEngine:
>            ******* Product: MyApp.msi
>            ******* Action: 
>            ******* CommandLine: ********** MSI (c) (5C:B0) [08:32:10:923]: Note: 1: 2203 2: MyApp.msi 3: -2147286960  MSI
> (c) (5C:B0) [08:32:10:933]: MainEngineThread is returning 1620
> === Verbose logging stopped: 1/14/2014  8:32:10 ===

Below is a screenshot showing the references and code in the bundle. I have also pasted the code below.

project preview

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

  <?define RTMProductVersion="1.0.0" ?>

  <?define Version="1.0.5" ?>
  <?define UpgradeCode="{1EDFF15B-E7AE-4E1E-960B-6B80AC6FE305}"?>
  <?define Manufacturer="MyCompany"?>
  <?define PackageCode="{????????-????-????-????-????????????}"?>

  <Bundle UpgradeCode="$(var.UpgradeCode)" Version="$(var.Version)">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <PackageGroupRef Id="NetFx45Redist" />
      <PackageGroupRef Id="MyApp" />
    </Chain>
  </Bundle>

  <Fragment>
    <PackageGroup Id="MyApp">
      <MsiPackage
        SourceFile="$(var.WiXInstaller.TargetPath)" />
    </PackageGroup>
  </Fragment>
</Wix>

Any idea on what I'm missing? Can I not use var.WiXInstaller.TargetPath here?

Upvotes: 0

Views: 419

Answers (1)

teynon
teynon

Reputation: 8318

Looking at Wix installer bundle produces corrupt "msi" suggests the output of a bundle is an exe, not an msi. Opening the project properties and setting the output type to .exe solved this issue. Although it looks like the bootstrapper is really ugly and bypasses the msi install dialog for my application. Sigh...

Upvotes: 2

Related Questions