joseph
joseph

Reputation: 298

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

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 (...) 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.

Upvotes: 4

Views: 3099

Answers (2)

LokeshChikkala
LokeshChikkala

Reputation: 11

Using command line arguments remove "" from dir and -out

"C:\Program Files (x86)\WiX Toolset v3.11\bin\heat.exe" dir C:\DemoProj\APIfolder\ -dr INSTALLFOLDER -ke -srd -sfrag -gg -cg APIFileId -out C:\DemoProj\APIFile.wxs

Upvotes: 1

Netfangled
Netfangled

Reputation: 2081

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.

Upvotes: 1

Related Questions