【问题标题】:How to provide hardcoded path to sourceDir in wix如何在 wix 中提供 sourceDir 的硬编码路径
【发布时间】:2016-10-27 07:39:54
【问题描述】:

我想出了一个 wix heat.exe 收获命令

heat.exe dir ../SessionAPI/Publish -cg C_SessionAPIWebSiteComponent -gg -scom -sreg -sfrag -srd -dr SessionAPIDirectory -var ..\SessionAPI -out ./SessionAPI.wxs

这将创建具有如下源的 .wxs 文件

Source="$(..\SessionAPI)\packages.config" />

但我不希望源指向环境变量,它应该希望它像

Source="..\SessionAPI\packages.config" />

我无法实现它。有人可以解释一下这个问题吗?

【问题讨论】:

    标签: wix heat


    【解决方案1】:

    您可以使用 XSLT 转换 Heat 生成的输出。看看这个问题和相应的答案: Move from manual component creation to harvesting with the HeatDirectory task

    【讨论】:

    • 非常感谢。但我已经这样做了,一位朋友帮助了我。
    【解决方案2】:

    最好不要打系统。使用 Heat 期望的变量,然后在蜡烛中定义该变量。

    heat.exe -var var.SessionAPI <other options>
    
    candle.exe -dSessionAPI=..\SessionAPI <other options>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-07
      • 2014-06-30
      • 2016-06-13
      相关资源
      最近更新 更多