wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 24 forks source link

Bundles v3.x and v4.x do not see package dependencies from each other #7778

Open petm2022 opened 1 year ago

petm2022 commented 1 year ago

Bugs

I have these four Managed Bootstrapper applications (bundles):

  1. Bundle A 1.0 (WiX3)
  2. Bundle A 2.0 (WiX4)
  3. Bundle B 1.0 (WiX3)
  4. Bundle B 2.0 (WiX4) All four bundles install several different msi packages, but they also have one msi package (MsiCommon) in common.

Scenario 1: (as expected) • Install Bundle A 1.0 and B 1.0 (or Bundle A 2.0 and B 2.0) • Uninstall one of them and MsiCommon is still present due to dependency, see log: Will not uninstall package: MsiCommon, found dependents: Found dependent: {guid}, name: My MsiCommon

Scenario 2: • Install Bundle A 1.0 (WiX3) • Upgrade with A 2.0 (WiX4) • The MsiCommon package is uninstalled by the cleanup of Bundle A 1.0

Scenario 3: • Install Bundle A 1.0 (WiX3) • Install Bundle B 2.0 (WiX4) • Uninstall either A 1.0 or B 2.0 and the MsiCommon will be uninstalled (no dependencies found)

Conclusion: It looks like bundles build with WiX3 cannot see dependencies from bundles build with WiX4 and vice versa. In registry I can see that WiX4 dependencies have a version on the GUID but WiX3 have not:

{GUID MsiCommon} ---Dependents ------{GUID Bundle A 1.0} {GUID MsiCommon}_v1.0.0 ---Dependents ------{GUID Bundle B 2.0}

petm2022 commented 1 year ago

I see the same problem when using the standard bootstrapper.

barnson commented 1 year ago

This was a behavior change to fix bug https://github.com/wixtoolset/issues/issues/6535.

barnson commented 1 year ago

Is there an option to get the bug fix in 6535 and maintain compatibility? Think about that.

Otherwise, you can hard-code the provider key in the WiX v4 build to the product code to keep compatible with the WiX v3 default.

petm2022 commented 1 year ago

If I add <Provides Key=”GUID MsiCommon”/> to in my Wix4 bundles (A 2.0 and B 2.0) it solves the problem.

Is it possible to get the ProductCode from the msi package MsiCommon in my bundle code? If I use !(bind.property.ProductCode) you mention in the WiX 269 Highlights I get “Unresolved bind-time variable”.

barnson commented 1 year ago

Turns out there's no bind-time variable for product code from a bundle. Need a new feature for that.

tjlakixi commented 5 months ago

I think I am experiencing this issue. Is my understanding correct that one cannot create a Wix4/5 bundle that successfully upgrades a Wix3 bundle unless <Provides Key='{productCode}'/> is added (and kept updated with new MSI versions)? OK - my understanding was not quite correct. It only fails if the MsiPackage version (first three fields) is the same in the v3 and v4/5 bundle.

Is there a WIP for a new bind-time variable like !(bind.productCode.{projectReference}?