Wix - how to handle project references when using heat's output with candle?
Asked Answered
F

2

6

I'm trying to use heat on a web .csproj, and then use candle on the output. So far, I've done:

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

And then:

candle StatusReport.wxs

However, upon 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 the output of heat in a Visual Studio Wix project?

Fulsome answered 20/11, 2009 at 23:21 Comment(1)
This won't help, but I've found the WiX documentation poor at best.Merlon
T
7

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

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

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

Alternatively, you can just edit StatusReport.wxs and replace the variable by the value that it's supposed to have.

Tullius answered 27/11, 2009 at 0:19 Comment(1)
When you do this, note that the variable in the Heat output contains a "var." at the start. You do not specify the "var." as part of the -d definition. This has me confused for about 5 mins before I figured it out.Epidiascope
F
0

The answer to the second question is easy, just Add Existing Item, and point to heat's output file, so I guess the first question doesn't matter.

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

Fulsome answered 24/11, 2009 at 22:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.