不再使用 Wix 和 Burn 安装 MsiPackage

MsiPackage isn’t installed anymore using Wix and Burn

在我的引导程序包中添加新的先决条件时,我不小心破坏了我的安装程序,导致无法安装我的内部 msi。我正在使用 Wix 3.8.1128 开始我的旅程。

通过引导程序设置,我安装了 .Net 4.6.1 和我自己的 msi。由于我们需要来自 Microsoft 的 4.6.1 的 Hotfixrollup,因此我还必须更新我的安装程序。因为我没有像我的 msi 那样管理它来安装修补程序汇总,所以我将它添加为 mba-prerequesite (http://wixtoolset.org/development/wips/4161-allow-more-than-one-mbaprereq/) 因此我不得不将 Wix 更新到 Wix 3.10.2.2516,因为我以前安装的 Wix 不理解“ bal: PrereqSupportPackage”

bundle.wxs 现在看起来像这样:

<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx46FullInternal" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="Net46License.rtf" />

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
  <Payload SourceFile="Licenses\NetfxLicense.rtf" Name="Net46License.rtf"/>
 <Some other payload like resource file for the custom bootstrapper ui>
</BootstrapperApplicationRef>

<Chain>
  <PackageGroupRef Id='Netfx46FullInternal' />
  <ExePackage Id="Netfx461HotfixRollup" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
        DisplayName="Microsoft .NET Framework 4.6.1 Hotfixrollup"
        DetectCondition="(Netfx4FullVersion >= &quot;4.6.01073&quot;) AND (NOT VersionNT64 OR (Netfx4x64FullVersion>=&quot;4.6.01073&quot;))"
        InstallCommand="/passive /norestart"
        SourceFile="..\..\..\..\Common\PayloadBundle\NDP461-KB3139551-x86-x64-ENU.exe" bal:PrereqSupportPackage="yes">
        <ExitCode Behavior="forceReboot" Value="1641" />
        <ExitCode Behavior="forceReboot" Value="3010" />
        <ExitCode Behavior="success" Value="0" />
  </ExePackage>
  <RollbackBoundary />
  <MsiPackage SourceFile="..\..\..\bin\Setup\Release\en-US\certified\MyMsi.msi" Id="SetupMSI" Cache="yes" DisplayInternalUI="no" SuppressSignatureVerification ="yes" Visible="no" >
     <MsiProperty Name="SETUPLANGLIST" Value="[STARTLCID]" />
     <MsiProperty Name="INSTALLLOCATION" Value="[INSTALLATIONFOLDER]" />
     <Payload SourceFile="..\..\..\Common\Localization\Transforms\de-DE\de-DE.mst" Id="GERMANTRANSFORM" ></Payload>
     <MsiProperty Name="TRANSFORMS" Value="[TRANSFORMNAME]" />
  </MsiPackage>
</Chain>

当我 运行 在不同的系统上安装此设置时,即安装了 .Net 4.6.1,安装了 Hotfix,没有等。日志总是看起来很好:

Snips:
[0870:0874][2016-03-16T15:52:56]i052: Condition '(Netfx4FullVersion >= "4.6") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6"))' evaluates to false.
[0870:0874][2016-03-16T15:52:56]i052: Condition '(Netfx4FullVersion >= "4.6.01073") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6.01073"))' evaluates to false.

[0870:0874][2016-03-16T15:52:56]i101: Detected package: Netfx4FullInternal, state: Absent, cached: None

[0870:0874][2016-03-16T15:52:56]i101: Detected package: Netfx461HotfixRollup, state: Absent, cached: None

[0870:0874][2016-03-16T15:52:56]i101: Detected package: SetupMSI, state: Absent, cached: None

[….]

[0870:0874][2016-03-16T15:52:58]i201: Planned package: Netfx4FullInternal, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: Yes, dependency: None

[0870:0874][2016-03-16T15:52:58]i201: Planned package: Netfx461HotfixRollup, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: Yes, dependency: None

[0870:0874][2016-03-16T15:52:58]i201: Planned package: SetupMSI, state: Absent, default requested: Present, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None

[…]

Verified acquired payload: Netfx4FullInternal at path: C:\ProgramData\Package Cache\.unverified\Netfx4FullInternal, moving to: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe.

[091C:0930][2016-03-16T15:53:22]i305: Verified acquired payload: Netfx461HotfixRollup at path: C:\ProgramData\Package Cache\.unverified\Netfx461HotfixRollup, moving to: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe.

[091C:0920][2016-03-16T15:53:22]i301: Applying execute package: Netfx4FullInternal, action: Install, path: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe, arguments: '"C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe" /passive /norestart'

[0870:0874][2016-03-16T15:59:11]i319: Applied execute package: Netfx4FullInternal, result: 0x0, restart: None

[091C:0920][2016-03-16T15:59:11]i301: Applying execute package: Netfx461HotfixRollup, action: Install, path: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe, arguments: '"C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe" /passive /norestart'

[0870:0874][2016-03-16T16:03:29]i319: Applied execute package: Netfx461HotfixRollup, result: 0x0, restart: None

[091C:0920][2016-03-16T16:03:29]i351: Removing cached package: Netfx4FullInternal, from path: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\

[091C:0920][2016-03-16T16:03:29]i351: Removing cached package: Netfx461HotfixRollup, from path: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\

[091C:0920][2016-03-16T16:03:29]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{e2db8a84-7452-4c88-ba7f-ef0799a8e9b0}, resume: ARP, restart: None, disable resume: No

[091C:0920][2016-03-16T16:03:29]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{e2db8a84-7452-4c88-ba7f-ef0799a8e9b0}, resume: ARP, restart initiated: No, disable resume: No

[0870:0874][2016-03-16T16:03:29]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No

[0870:0874][2016-03-16T16:03:29]i500: Shutting down, exit code: 0x0
[0870:0874][2016-03-16T16:03:29]i000: The prerequisites were successfully installed. The bootstrapper application will be reloaded.

[…]

至此,先决条件已成功安装。引导程序已重新加载。系统本身没有重启。然后,该过程再次开始。但是我的内部 msi 从未安装过。

因为我们需要这个设置,所以我回滚了我的更改,但让 Wix 3.10.2.2516 保留在 build 服务器上。

现在我的设置,即使它在 toto 中与以前完全相同,也无法安装我的内部 msi 包。所以我担心从 Wix 3.8 到 3.10 发生了一些变化,这可能会使我们的设置中的设计失败浮出水面。 我们正在处理几个检测事件,以根据包状态设置我们的 ui。 所以我想知道 Wix 3.10.2 中发生了什么变化以及如何解决我的问题?

编辑和更新: 整个日志如下所示:

[09BC:09C0][2016-03-18T13:06:40]i001: Burn v3.10.2.2516, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\admin\AppData\Local\Temp\{4045AD9D-EBFB-40DA-A3A7-8AA715BF55B3}\.cr\MySetup.exe
[09BC:09C0][2016-03-18T13:06:40]i009: Command Line: '"-burn.clean.room=C:\Users\admin\Desktop\MySetup.exe"'
[09BC:09C0][2016-03-18T13:06:40]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\admin\Desktop\MySetup.exe'
[09BC:09C0][2016-03-18T13:06:40]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\admin\Desktop\'
[09BC:09C0][2016-03-18T13:06:40]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640.log'
[09BC:09C0][2016-03-18T13:06:41]i000: Setting string variable 'WixBundleName' to value 'MySetup 2.0'
[09BC:09C0][2016-03-18T13:06:41]i000: Setting string variable 'WixBundleManufacturer' to value 'MyComp'
[09BC:09C0][2016-03-18T13:06:41]i000: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80070490.
[09BC:09D4][2016-03-18T13:06:41]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
[09BC:09D4][2016-03-18T13:06:41]i000: Setting version variable 'WixBundleFileVersion' to value '2.0.6858.48481'
[09BC:09C0][2016-03-18T13:06:42]i100: Detect begin, 3 packages
[09BC:09C0][2016-03-18T13:06:42]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full'
[09BC:09C0][2016-03-18T13:06:42]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full'
[09BC:09C0][2016-03-18T13:06:42]i052: Condition '(Netfx4FullVersion >= "4.6") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6"))' evaluates to false.
[09BC:09C0][2016-03-18T13:06:42]i052: Condition '(Netfx4FullVersion >= "4.6.01073") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6.01073"))' evaluates to false.
[09BC:09C0][2016-03-18T13:06:42]i101: Detected package: Netfx4FullInternal, state: Absent, cached: None
[09BC:09C0][2016-03-18T13:06:42]i101: Detected package: Netfx461HotfixRollup, state: Absent, cached: None
[09BC:09C0][2016-03-18T13:06:42]i101: Detected package: MyInternalSetupMSI, state: Absent, cached: None
[09BC:09C0][2016-03-18T13:06:42]i199: Detect complete, result: 0x0
[09BC:09C0][2016-03-18T13:06:44]i200: Plan begin, 3 packages, action: Install
[09BC:09C0][2016-03-18T13:06:44]w321: Skipping dependency registration on package with no dependency providers: Netfx4FullInternal
[09BC:09C0][2016-03-18T13:06:44]i000: Setting string variable 'WixBundleLog_Netfx4FullInternal' to value 'C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640_000_Netfx4FullInternal.log'
[09BC:09C0][2016-03-18T13:06:44]w321: Skipping dependency registration on package with no dependency providers: Netfx461HotfixRollup
[09BC:09C0][2016-03-18T13:06:44]i000: Setting string variable 'WixBundleLog_Netfx461HotfixRollup' to value 'C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640_001_Netfx461HotfixRollup.log'
[09BC:09C0][2016-03-18T13:06:44]i201: Planned package: Netfx4FullInternal, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: Yes, dependency: None
[09BC:09C0][2016-03-18T13:06:44]i201: Planned package: Netfx461HotfixRollup, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: Yes, dependency: None
[09BC:09C0][2016-03-18T13:06:44]i201: Planned package: MyInternalSetupMSI, state: Absent, default requested: Present, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[09BC:09C0][2016-03-18T13:06:44]i299: Plan complete, result: 0x0
[09BC:09C0][2016-03-18T13:06:44]i300: Apply begin
[09BC:09C0][2016-03-18T13:06:44]i010: Launching elevated engine process.
[09BC:09C0][2016-03-18T13:06:51]i011: Launched elevated engine process.
[09BC:09C0][2016-03-18T13:06:51]i012: Connected to elevated engine.
[0A5C:0A60][2016-03-18T13:06:51]i358: Pausing automatic updates.
[0A5C:0A60][2016-03-18T13:06:52]i359: Paused automatic updates.
[0A5C:0A60][2016-03-18T13:06:52]i360: Creating a system restore point.
[0A5C:0A60][2016-03-18T13:07:04]i361: Created a system restore point.
[0A5C:0A60][2016-03-18T13:07:04]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, options: 0x7, disable resume: No
[0A5C:0A60][2016-03-18T13:07:04]i000: Caching bundle from: 'C:\Users\admin\AppData\Local\Temp\{B3F81685-3E6A-41D1-95D9-641F8276F3FF}\.be\MySetup.exe' to: 'C:\ProgramData\Package Cache\{22d938da-2fa9-4609-beeb-86c3469d5eeb}\MySetup.exe'
[0A5C:0A60][2016-03-18T13:07:04]i320: Registering bundle dependency provider: {22d938da-2fa9-4609-beeb-86c3469d5eeb}, version: 2.0.6858.48481
[0A5C:0A60][2016-03-18T13:07:04]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: Active, restart initiated: No, disable resume: No
[09BC:0BF4][2016-03-18T13:07:04]i336: Acquiring container: WixAttachedContainer, copy from: C:\Users\admin\Desktop\MySetup.exe
[09BC:0BF4][2016-03-18T13:07:06]i000: Setting string variable 'WixBundleLastUsedSource' to value 'C:\Users\admin\Desktop\'
[0A5C:0A70][2016-03-18T13:07:07]i305: Verified acquired payload: Netfx4FullInternal at path: C:\ProgramData\Package Cache\.unverified\Netfx4FullInternal, moving to: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe.
[0A5C:0A70][2016-03-18T13:07:08]i305: Verified acquired payload: Netfx461HotfixRollup at path: C:\ProgramData\Package Cache\.unverified\Netfx461HotfixRollup, moving to: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe.
[0A5C:0A60][2016-03-18T13:07:08]i301: Applying execute package: Netfx4FullInternal, action: Install, path: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe, arguments: '"C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\NDP461-KB3102436-x86-x64-AllOS-ENU.exe" /passive /norestart'
[09BC:09C0][2016-03-18T13:11:19]i319: Applied execute package: Netfx4FullInternal, result: 0x0, restart: None
[0A5C:0A60][2016-03-18T13:11:19]i301: Applying execute package: Netfx461HotfixRollup, action: Install, path: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe, arguments: '"C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\NDP461-KB3139551-x86-x64-ENU.exe" /passive /norestart'
[09BC:09C0][2016-03-18T13:14:50]i319: Applied execute package: Netfx461HotfixRollup, result: 0x0, restart: None
[0A5C:0A60][2016-03-18T13:14:50]i351: Removing cached package: Netfx4FullInternal, from path: C:\ProgramData\Package CacheD048D171FF44A3CAD9B422137656F585295866\
[0A5C:0A60][2016-03-18T13:14:50]i351: Removing cached package: Netfx461HotfixRollup, from path: C:\ProgramData\Package CacheAFF8231798A7A66EF10BAF8B4B4BCF1CE29874E\
[0A5C:0A60][2016-03-18T13:14:50]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: ARP, restart: None, disable resume: No
[0A5C:0A60][2016-03-18T13:14:50]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: ARP, restart initiated: No, disable resume: No
[09BC:09C0][2016-03-18T13:14:50]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
[09BC:09C0][2016-03-18T13:14:50]i500: Shutting down, exit code: 0x0
[09BC:09C0][2016-03-18T13:14:50]i000: The prerequisites were successfully installed. The bootstrapper application will be reloaded.
[09BC:09C0][2016-03-18T13:14:50]i006: Bootstrapper application requested to be reloaded.
[09BC:09C0][2016-03-18T13:14:50]i000: Loading managed bootstrapper application.
[09BC:09C0][2016-03-18T13:14:50]i000: Creating BA thread to run asynchronously.
[09BC:0B38][2016-03-18T13:14:50]i000: Setting string variable 'STARTLCID' to value '1031'
[09BC:09C0][2016-03-18T13:14:51]i100: Detect begin, 3 packages
[09BC:09C0][2016-03-18T13:14:51]i000: Setting string variable 'Netfx4x64FullVersion' to value '4.6.01073'
[09BC:09C0][2016-03-18T13:14:51]i000: Setting string variable 'Netfx4FullVersion' to value '4.6.01073'
[09BC:09C0][2016-03-18T13:14:51]i052: Condition '(Netfx4FullVersion >= "4.6") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6"))' evaluates to true.
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete State Present
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete Status 0
[09BC:09C0][2016-03-18T13:14:51]i052: Condition '(Netfx4FullVersion >= "4.6.01073") AND (NOT VersionNT64 OR (Netfx4x64FullVersion>="4.6.01073"))' evaluates to true.
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete State Present
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete Status 0
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete State Absent
[09BC:09C0][2016-03-18T13:14:51]i000: DetectPackageComplete Status 0
[09BC:09C0][2016-03-18T13:14:51]i101: Detected package: Netfx4FullInternal, state: Present, cached: None
[09BC:09C0][2016-03-18T13:14:51]i101: Detected package: Netfx461HotfixRollup, state: Present, cached: None
[09BC:09C0][2016-03-18T13:14:51]i101: Detected package: MyInternalSetupMSI, state: Absent, cached: None
[09BC:09C0][2016-03-18T13:14:51]i199: Detect complete, result: 0x0
[09BC:0B38][2016-03-18T13:14:51]i000: SetupDialogWorkflow
[09BC:0B38][2016-03-18T13:14:51]i000: Setting string variable 'INSTALLATIONFOLDER' to value 'C:\Program Files (x86)\MyComp\My Setup.0'
[09BC:0B38][2016-03-18T13:14:51]i000: Setting string variable 'STARTLCID' to value '2057'
[09BC:09C0][2016-03-18T13:15:27]i200: Plan begin, 3 packages, action: Cache
[09BC:09C0][2016-03-18T13:15:27]w321: Skipping dependency registration on package with no dependency providers: Netfx4FullInternal
[09BC:09C0][2016-03-18T13:15:27]w321: Skipping dependency registration on package with no dependency providers: Netfx461HotfixRollup
[09BC:09C0][2016-03-18T13:15:27]i201: Planned package: Netfx4FullInternal, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[09BC:09C0][2016-03-18T13:15:27]i201: Planned package: Netfx461HotfixRollup, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[09BC:09C0][2016-03-18T13:15:27]i201: Planned package: MyInternalSetupMSI, state: Absent, default requested: Cache, ba requested: Cache, execute: None, rollback: None, cache: Yes, uncache: No, dependency: None
[09BC:09C0][2016-03-18T13:15:27]i299: Plan complete, result: 0x0
[09BC:09C0][2016-03-18T13:15:27]i300: Apply begin
[0A5C:0A60][2016-03-18T13:15:27]i358: Pausing automatic updates.
[0A5C:0A60][2016-03-18T13:15:27]i359: Paused automatic updates.
[0A5C:0A60][2016-03-18T13:15:27]i360: Creating a system restore point.
[0A5C:0A60][2016-03-18T13:15:33]i361: Created a system restore point.
[0A5C:0A60][2016-03-18T13:15:33]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, options: 0x4, disable resume: No
[0A5C:0A60][2016-03-18T13:15:33]i320: Registering bundle dependency provider: {22d938da-2fa9-4609-beeb-86c3469d5eeb}, version: 2.0.6858.48481
[0A5C:0A60][2016-03-18T13:15:33]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: Active, restart initiated: No, disable resume: No
[09BC:095C][2016-03-18T13:15:33]i336: Acquiring container: WixAttachedContainer, copy from: C:\Users\admin\Desktop\MySetup.exe
[0A5C:0A70][2016-03-18T13:15:34]i305: Verified acquired payload: MyInternalSetupMSI at path: C:\ProgramData\Package Cache\.unverified\MyInternalSetupMSI, moving to: C:\ProgramData\Package Cache\{AB62269F-C1BF-44DA-A3DF-B5806E7D066F}v2.0.6858.48481\MyInternalSetupMSI.msi.
[0A5C:0A70][2016-03-18T13:15:34]i305: Verified acquired payload: GERMANTRANSFORM at path: C:\ProgramData\Package Cache\.unverified\GERMANTRANSFORM, moving to: C:\ProgramData\Package Cache\{AB62269F-C1BF-44DA-A3DF-B5806E7D066F}v2.0.6858.48481\de-DE.mst.
[0A5C:0A60][2016-03-18T13:15:34]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: None, restart: None, disable resume: No
[0A5C:0A60][2016-03-18T13:15:34]i330: Removed bundle dependency provider: {22d938da-2fa9-4609-beeb-86c3469d5eeb}
[0A5C:0A60][2016-03-18T13:15:34]i352: Removing cached bundle: {22d938da-2fa9-4609-beeb-86c3469d5eeb}, from path: C:\ProgramData\Package Cache\{22d938da-2fa9-4609-beeb-86c3469d5eeb}\
[0A5C:0A60][2016-03-18T13:15:34]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{22d938da-2fa9-4609-beeb-86c3469d5eeb}, resume: None, restart initiated: No, disable resume: No
[09BC:09C0][2016-03-18T13:15:34]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
[09BC:09C0][2016-03-18T13:15:38]i500: Shutting down, exit code: 0x0
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: INSTALLATIONFOLDER = C:\Program Files (x86)\MyComp\My Setup.0
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: Netfx4FullVersion = 4.6.01073
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: Netfx4x64FullVersion = 4.6.01073
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: STARTLCID = 2057
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: VersionNT64 = 6.1.0.0
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleAction = 4
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleElevated = 1
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleFileVersion = 2.0.6858.48481
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleInstalled = 0
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleLastUsedSource = C:\Users\admin\Desktop\
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleLog = C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640.log
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleLog_Netfx461HotfixRollup = C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640_001_Netfx461HotfixRollup.log
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleLog_Netfx4FullInternal = C:\Users\admin\AppData\Local\Temp\MySetup_2.0_20160318130640_000_Netfx4FullInternal.log
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleManufacturer = MyComp
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleName = MySetup 2.0
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleOriginalSource = C:\Users\admin\Desktop\MySetup.exe
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleOriginalSourceFolder = C:\Users\admin\Desktop\
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleProviderKey = {22d938da-2fa9-4609-beeb-86c3469d5eeb}
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleSourceProcessFolder = C:\Users\admin\Desktop\
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleSourceProcessPath = C:\Users\admin\Desktop\MySetup.exe
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleTag = 
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixBundleVersion = 2.0.6858.48481
[09BC:09C0][2016-03-18T13:15:38]i410: Variable: WixStdBALanguageId = 1033
[09BC:09C0][2016-03-18T13:15:38]i007: Exit code: 0x0, restarting: No

我们正在对一些事件做出反应,但在 Wix 3.10.2 之前运行良好。

private void Model_DetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
{
  if (e.PackageId != "MyInternalSetupMSI")
  {
    return;
  }

  switch (e.State)
  {
    case PackageState.Present:
      this.currentLaunchAction = LaunchAction.Uninstall;
      break;
    case PackageState.Absent:
      this.currentLaunchAction = LaunchAction.Install;
      break;
    case PackageState.Superseded:
      this.currentLaunchAction = LaunchAction.Unknown;
    break;
  }
} 


private void DetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
{
  this.onLoggerAction(LogLevel.Verbose, string.Format("DetectPackageComplete State {0}", e.State));
  this.onLoggerAction(LogLevel.Verbose, string.Format("DetectPackageComplete Status {0}", e.Status));
  if (e.PackageId == "MyInternalSetupMSI")
  {
    this.dispatcher.BeginInvoke((Action)(() => this.DetectPackageComplete(e.State)));
  }
}

这是问题所在:

[09BC:09C0][2016-03-18T13:15:27]i201: Planned package: MyInternalSetupMSI, state: Absent, default requested: Cache, ba requested: Cache, execute: None, rollback: None, cache: Yes, uncache: No, dependency: None

Install 值在 v3.10 中更改,因此该值现在为 Cache。每当您在 v3.x 中升级 WiX 版本时,您都需要重新编译您的 BA。我们正在 v4 中删除此要求。