wixtoolset / issues

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

Bundle generates WIX8011: Failed to update resources in the bundle after upgrade to 5.0.0. #8114

Closed RichardJFoster closed 6 months ago

RichardJFoster commented 6 months ago

WiX Version

5.0.0

.NET or MSBuild or Visual Studio Version

MSBuild version 17.9.8+b34f75857 for .NET Framework

HeatWave Version

1.0.3.14

Windows Version

Win 11 23H2

Repro Repo

No response

Repro Steps

  1. Define a valid, working, bundle in Wix 4.X (we were on 4.0.5), which uses the WixStandardBootstrapperApplication and includes in the bundle chain the PackageGroupRef "NetFx472RedistAsPrereq", and an MSI PackageRef to a setup package from the same solution (e.g. <MsiPackage Id="MySetup" SourceFile="$(var.MySetup.TargetPath)" bal:DisplayInternalUICondition="WixBundleAction >= 6" />.
  2. Set the version for the bundle to the same value as the referenced package ( Version="!(bind.packageVersion.MySetup)").
  3. Update from Wix 4.0.5 to 5.0.0 and rebuild.

Actual Result

While the project generating the MSI appears to operate correctly, creation of the bootstrapper fails, apparently on the Bundle element itself, with the message error WIX8011: Failed to update resources in the bundle. Detail: Failed to save resource. Error 5.

Expected Result

I expected to see a successful bundle creation.

Acknowledgements

barnson commented 6 months ago

Please attach a binlog (msbuild -bl) so we can see detailed build info.

RichardJFoster commented 6 months ago

Hopefully the attached binlog is helpful. Weirdly, while the error was seen in Visual Studio, it was not seen when running dotnet build. I also created what I hope will allow you to see the same issue in the repository at https://github.com/RichardJFoster/WiXRepro_8114. The initial commit closely resembles the specific scenario that is present in a current version of the software I am working on using WiX 4.0.5 where everything appears to be OK. The second commit provides the equivalent changes I made when moving from 4.0.5 to 5.0.0 and shows the same result.

Please let me know if you need anything else.

MSBuild_binlog.zip

barnson commented 6 months ago

I couldn't reproduce the problem using MSBuild, dotnet build, or VS 17.9.6. WiX has automatic retry logic, so something's locking the file for an extended period of time. ProcMon should show you what's locking the file.