1
votes

I've been trying to make an installer based on this example, and I appear to have run into a bit of a sticking point. The sample installers I've developed compile properly and install as they should, but when I go to create the higher level bootstrapper and installer, I run into a snag- the WPF UI does not hook in properly.

When I run the installer, it gives me a generic installer with a red disk with a title that says Microsoft .NET Framework required for Installer Setup. Running this causes an entry to be made for Window's Install/Uninstall that cannot be uninstalled- it also does not appear to have dropped the payload, only attempted to install the .Net Framework.

Top level wix file follows, and thank you for looking.

Bundle.wxs - part of the bootstrapper setup

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    <Bundle Name="Jeremiah's Test Installer" Version="1.0.0.0" Manufacturer="Starkey" UpgradeCode="5a714642-7857-4582-8bae-80fd6d8ec77a">
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
      <Payload SourceFile="..\TestWPF003\bin\Release\TestWPF003.dll"/>
      <Payload SourceFile="..\TestWPF003\bootstrapper.config"/>
      <Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.9\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
    </BootstrapperApplicationRef>

        <Chain>
            <!-- TODO: Define the list of chained packages. -->
            <!-- <MsiPackage SourceFile="path\to\your.msi" /> -->
      <PackageGroupRef Id='Netfx4Full' />      
      <MsiPackage SourceFile="..\beta\bin\Release\beta.msi"  Id="BetaInstallId" Cache="yes" Visible="no"/>
      <MsiPackage SourceFile="..\alpha\bin\Release\alpha.msi"  Id="AlphaInstallId" Cache="yes" Visible="yes"/>
        </Chain>
    </Bundle>

  <Fragment>
    <!-- Managed bootstrapper requires .NET as a dependency, since it was written in .NET.
       WiX provides a Bootstrapper for the bootstrapper. The fragment below includes .NET.
       For more information or examples see Heath Stewart's blog or the WiX source:
       http://blogs.msdn.com/b/heaths/archive/2011/10/28/introducing-managed-bootstrapper-applications.aspx
       -->

    <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />

    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />

    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
                  SourceFile="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\dotNetFx40_Full_x86_x64.exe"
                  DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
    </PackageGroup>
  </Fragment>

</Wix>
1
I assume you're not using MvvmLight, and that's why you don't have a Payload entry for it? Other than that, your bundle.wxs seems nearly identical to the one in the sample you linked to. Maybe try comparing the code using winmerge?user145400
I recommend using a virtual machine to test installers, that way you can take a snapshot and restore it to a clean slate whenever needed.user145400
You are correct- I'm not using MvvmLight. You raise an excellent point with VMs. If I can get my hands on one, I'll start using it for testing.jpatrick

1 Answers

0
votes

I think it's because you are missing the BootstrapperCore.config file, you can't rename it to anything else.

  <Payload SourceFile="..\TestWPF003\BootstrapperCore.config"/>

Edit: I don't think the name attribute was the problem, but specifically the file name has to be BootstrapperCore.config, try using the line I specified above :)