【发布时间】:2011-09-21 16:46:11
【问题描述】:
我有一个 tfs 2008 版本,需要添加 WiX 编译。
当前构建执行并编译并将所有输出复制到以下目标中的放置位置
<Target Name="AfterCompile"> .... </Target>
我在它的正下方添加了另一个目标,如下所示
<UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
<Target Name="BuildMsi" DependsOnTargets="AfterCompile">
<Message Text="Start harvesting Website files for Wix compliation" />
<HeatDirectory
ToolPath="$(WixToolPath)"
Directory="$(DropLocation)\Latest\x86\Release\_PublishedWebsites\IFMA.MasterPlan.Web"
GenerateGuidsNow="yes"
ComponentGroupName="Web"
OutputFile="$(MSBuildProjectDirectory)\Setup\Product\Fragments\wwwfiles.wxs"
SuppressFragments="yes"
DirectoryRefId="WebRoot"
KeepEmptyDirectories="yes"
PreprocessorVariable="var.WebRoot"
SuppressRegistry="yes"
SuppressRootDirectory="yes"
SuppressCom="yes"
/>
<Message Text="Finished harvesting Website files for Wix compliation" />
</Target>
BuildMsi 目标永远不会执行,但 AfterCompile 肯定会执行。
默认构建目标中未列出 BuildMsi 但我认为由于它依赖于 AfterCompile 它将在它之后执行。
我在这里错过了什么?
【问题讨论】:
-
我不确定 heat 任务是否正确,但我实际上并不关心让目标执行然后我可以担心让 heat 任务工作
-
Daniel - 我添加了一些关于目标注入的信息,您可能可以在这种情况下使用这些信息。