wixtoolset / issues

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

Heatwave: Build variables not available in Pre and Post-Build events #7020

Closed MBroholmA closed 1 year ago

MBroholmA commented 1 year ago

Build variables not available in Pre and Post-Build events

  1. Create a new blank V3 project
  2. Add a post-build event: `echo Test $(TargetPath)
  3. Build and test that it outputs the path of the .msi file in the build log
  4. Convert the project to V4 using Heatwave
  5. Build and check the build log. It only outputs "Test " now

This simple example gets converted to a V4 SDK-style project. I don't know how to fix this for SDK projects, but for my real project this was fixed by moving the line up above the tag

EDIT: After testing these flows I found out that it's the same problem in a new V4 project

robmen commented 1 year ago

Can you link to a repository with a repo or (if sufficient) attach a .wixproj that demonstrates the problem(s)?

MBroholmA commented 1 year ago

I can make a repo to provoke the issue when upgrading from V3, but the problem is also present in a new V4 project.

  1. Create a new project MSI Package (WiX V4).
  2. Insert "echo Test $(TargetPath)" as a post- or pre-build event

The $(TargetPath) is blank in the build log. This goes for all the build variables I tested

This might be a separate issue from the upgrade scenario, but the symptoms are the same.

robmen commented 1 year ago

Hey, @FireGiantHelp, this looks like a HeatWave conversion-specific issue for you to consider.