Wix - 使用热量输出和蜡烛时如何处理项目参考?

Dav*_*son 6 preprocessor wix wix3 heat

我正在尝试在网络上使用热量.csproj,然后在输出上使用蜡烛.到目前为止,我已经完成了:

heat project "StatusReport Web.csproj" -pog:Binaries pog:Content -ag -out StatusReport.wxs
Run Code Online (Sandbox Code Playgroud)

然后:

candle StatusReport.wxs
Run Code Online (Sandbox Code Playgroud)

但是,根据后者,我得到:

Error CNDL0150: Undefined preprocessor variable '$(var.StatusReport Web.TargetDir)'.
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

另外,有没有办法在Visual Studio Wix项目中使用热量输出?

Wim*_*nen 7

生成的wxs文件heat.exe包含预处理器变量$(var.StatusReport Web.TargetDir).您必须将此变量的值传递给candle.exe.它应该设置为二进制文件的visual studio输出文件夹.

您可以将此变量的值传递给candle.exe:

candle.exe -dStatusReport.Web.TargetDir=c:\myproject\bin StatusReport.wxs
Run Code Online (Sandbox Code Playgroud)

或者,您可以StatusReport.wxs通过它应该具有的值来编辑和替换变量.

  • 执行此操作时,请注意Heat输出中的变量包含"var".在开始时.您没有指定"var." 作为-d定义的一部分.在我弄明白之前,这让我困惑了约5分钟. (3认同)