Wix Bootstrapper 自定义 gui 未显示

Wix Bootstrapper custom gui not showing up

我一直在尝试基于 this example, 制作安装程序,但我似乎 运行 有点棘手。我开发的示例安装程序可以正确编译并按应有的方式安装,但是当我去创建更高级别的引导程序和安装程序时,我 运行 陷入困境 - WPF UI 没有正确挂钩.

当我 运行 安装程序时,它会给我一个带有红色磁盘的通用安装程序,其标题显示安装程序安装需要 Microsoft .NET Framework。 运行 这会导致为 Window 的 Install/Uninstall 创建一个无法卸载的条目 - 它似乎也没有删除有效负载,只是试图安装 .Net Framework。

顶级wix文件如下,感谢您的观看。

Bundle.wxs - 引导程序设置的一部分

<?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>

我认为这是因为您缺少 BootstrapperCore.config 文件,您无法将其重命名为其他名称。

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

编辑:我认为名称属性不是问题,但具体来说文件名必须是 BootstrapperCore.config,请尝试使用我在上面指定的行:)