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