Question

I upgraded WiX to version 3.7 from version 3.5, and I am now encountering an error in a pre-build step of our installer.

The pre-build step in question is "%wix%\bin\heat.exe" dir "$(OutDir)_PublishedWebsites\Application Files" -dr INSTALL_LOCATION -cg SourceComponentGroup -ag -var var.SourcePath -out "$(ProjectDir)HeatFile.Generated.wxs"

This now results in our Team Build failing with the error C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets (816): The command ""%wix%\bin\heat.exe" dir "C:\Builds\12\TFS\Wix 3.7 Test Build\Binaries\_PublishedWebsites\Application Files" -dr INSTALL_LOCATION -cg SourceComponentGroup -ag -var var.SourcePath -out "C:\TFS\WiX3.7\Install\HeatFile.Generated.wxs"" exited with code 3

I can't figure out what would've changed to cause this error, unless something has changed in heat that I haven't been able to find out about.

Edit:

After Rob mentioned verbose builds in the comment below, I had a look and found that in the "Environment before build" and found that the WIX property is set to WIX = C:\Program Files (x86)\Windows Installer XML v3.5\, yet when I look at the same property in the system environment variables via Control Panel, I see that WIX is set to C:\Program Files (x86)\WiX Toolset v3.7\.

Is there somewhere in the MSBuild configuration that this would be set?

Edit 2:

I've also spotted this in our .wixproj file:

<ProductVersion>3.5</ProductVersion>
<ProjectGuid>{GUID}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Install</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

Is there anything that needs changing in here (e.g. the product version)?

Was it helpful?

Solution

I did 2 things which seem to have resolved my issue, so I can't say for certain what the exact resolution is, but here's what I did.

  1. I rebooted the build server. Despite it showing the correct environment variable, and returning the right value from a command line, I rebooted just in case.
  2. I changed the pre-build event to use $(WIX) instead of %WIX%

The build now correctly runs the event and succeeds. I'm having a different issue with IIS websites, but I'll raise a new question for that if I need to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top