我正在尝试将.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 ===下面是一个屏幕截图,显示了包中的引用和代码。我还粘贴了下面的代码。

<?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吗?
发布于 2014-01-14 14:00:44
从Wix installer bundle produces corrupt "msi"的角度来看,包的输出是一个exe,而不是msi。打开项目属性并将输出类型设置为.exe解决了此问题。尽管它看起来很难看,并且绕过了我的应用程序的msi安装对话框。叹息..。
https://stackoverflow.com/questions/21115216
复制相似问题