Wix heat command exited with code 319 (-out parameter must specify a file path)

StackOverflow https://stackoverflow.com/questions/18077763

  •  23-06-2022
  •  | 
  •  

Question

I'm building an installer for my web app (.NET), using Wix v3.7 and Visual Studio 2012.

To harvest my web project files I'm using heat, and my .wixproj looks like this:

<Target Name="BeforeBuild">
    <Exec Command=' "$(WiX)bin\heat.exe" project "..\Web \" -gg -g1 -cg PACKAGEFILES sreg -dr DEPLOYFOLDER -out "$(ProjectDir)Frags.wxs" '/>
    <ItemGroup>
      <Compile Include='Frags.wxs' />
    </ItemGroup>
  </Target>

I get the following errors when compiling:

  • The '-out' or '-o' parameter must specify a file path. File: heat.exe
  • The command " "C:\Program Files (x86)\WiX Toolset v3.7\bin\heat.exe" project "..\Web \" -gg -g1 -cg PACKAGEFILES sreg -dr DEPLOYFOLDER -out "C:\Users(...)\Server\Wix\Frags.wxs" " exited with code 319. File: C:\Users(...)\Server\Wix\Wix.wixproj

The (...) are added by me, for privacy concerns. The files paths do not exceed the limit.

I've tried changing the quotes, different parameters, etc, but the error persists.

Was it helpful?

Solution

As mentioned in the comments, to harvest a project, you must specify the project's file path:

"$(WiX)bin\heat.exe" project "..\Web\MyProject.csproj" -gg -g1 
-cg PACKAGEFILES -sreg -dr DEPLOYFOLDER -out "$(ProjectDir)Frags.wxs"

Be aware that heat does not support harvesting referenced assemblies in 3.7. According to this bug, it will be added in 4.0.

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