WiX .NET45 Bootstrapper

时间:2014-01-14 13:51:15

标签: wix bundle

我正在尝试将.NET 4.5与我的应用程序一起包含在内。我已按照VS2012 and Wix 3.6 - Installing .Net 4.5 with my application上的说明和http://wixtoolset.org/documentation/manual/v3/bundle/

的子链接进行操作

我设法让它构建,但安装程序会立即报告This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.

日志文件显示:

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

下面是显示捆绑包中的引用和代码的屏幕截图。我还粘贴了下面的代码。

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>

对我失踪的事情有任何想法?我不能在这里使用var.WiXInstaller.TargetPath吗?

1 个答案:

答案 0 :(得分:2)

查看Wix installer bundle produces corrupt "msi"表明bundle的输出是exe,而不是msi。打开项目属性并将输出类型设置为.exe解决了此问题。虽然看起来引导程序真的很难看,但绕过了我的应用程序的msi安装对话框。叹息...