2015-02-17 64 views
1

我一直在尝试根据this example,作出安装程序,我似乎遇到了一些棘手的问题。我开发的示例安装程序已正确编译并按照它们的安装进行安装,但是当我创建更高级别的引导程序和安装程序时,我遇到了一个问题 - WPF UI无法正确挂接。Wix引导程序自定义GUI没有显示

当我运行安装程序时,它为我提供了一个通用的安装程序,其中包含一个红色磁盘,其标题为安装程序安装所需的Microsoft .NET Framework。运行此操作会导致无法卸载窗口的安装/卸载条目 - 它似乎也没有删除有效负载,只尝试安装.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> 
+0

指定的行我假设你'不使用MvvmLight,这就是为什么你没有Payload入口?除此之外,您的bundle.wxs与您链接的示例中的bundle.wxs似乎几乎完全相同。也许尝试使用winmerge比较代码? – user145400 2015-02-17 21:39:39

+0

我建议使用虚拟机来测试安装程序,这样您可以拍摄快照并在需要时将其恢复到干净的平板。 – user145400 2015-02-17 21:40:45

+0

你是对的 - 我没有使用MvvmLight。 您提高了虚拟机的优点。如果我能接触到一个,我会开始使用它进行测试。 – jpatrick 2015-02-18 14:23:03

回答

0

我想这是因为你缺少的BootstrapperCore.config文件的一部分,你无法将其重命名为别的。

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

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

+0

我删除了您显示的名称标签,但没有改变结果。我编辑了我原来的帖子来反映这一点。 – jpatrick 2015-02-18 14:21:17

+0

@jpatrick检查编辑我做的 – user145400 2015-02-18 15:57:19

+0

好吧,打败我没有意义。 布拉沃先生!好样的! – jpatrick 2015-02-18 16:35:10