Wix - how to handle project links when using heat with a candle?

I try to use heat on the Internet .csproj and then use a candle on the output. So far I have done:

heat project "StatusReport Web.csproj" -pog:Binaries pog:Content -ag -out StatusReport.wxs 

And then:

 candle StatusReport.wxs 

However, for the latter, I get:

 Error CNDL0150: Undefined preprocessor variable '$(var.StatusReport Web.TargetDir)'. 

What am I doing wrong?

Also, is there a way to use heat output in a Visual Studio Wix project?

+6
preprocessor wix wix3 heat
source share
2 answers

The wxs file created by heat.exe contains the $(var.StatusReport Web.TargetDir) preprocessor variable $(var.StatusReport Web.TargetDir) . You must pass the value of this variable to candle.exe. It should be installed in the output folder of the visual studio of your binary files.

You can pass the value of this variable to candle.exe as follows:

 candle.exe -dStatusReport.Web.TargetDir=c:\myproject\bin StatusReport.wxs 

Alternatively, you can simply edit StatusReport.wxs and replace the variable with the value that it should have.

+6
source share

The answer to the second question is simple, just add an existing element and point to the file with heat output, so I think the first question does not matter.

It would be neat if heat could handle the project dependencies for you.

0
source share

All Articles