大家好:我的第一篇文章!
我正在尝试使用 heatdirectory 获取 wixproj,以使用 visualstudio 的“定义常量”功能获取其源目录,其中我定义了一个常量 SourceBinaries=c:\someproject\bin\release。
目的是为多个项目使用相同的 wixproj/setup 并使用 TFS-Build 自动化整个项目......
但是,目录标签永远不会获得 SourceBinaries 的值。
这是xml代码:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
blah..
<OutputName>ProjectSetup</OutputName>
blah..
</PropertyGroup>
<PropertyGroup>
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>SourceBinaries=c:\someproject\bin\release\</DefineConstants>
</PropertyGroup>
<ItemGroup>
blah..
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Target Name="BeforeBuild">
<HeatDirectory NoLogo="$(HarvestDirectoryNoLogo)"
Directory="$(SourceBinaries)"
PreprocessorVariable="var.SourceBinaries"
SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
ToolPath="$(WixToolPath)"
TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
VerboseOutput="$(HarvestDirectoryVerboseOutput)"
AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
OutputFile="ProductFiles.wxs"
SuppressFragments="$(HarvestDirectorySuppressFragments)"
SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
Transforms="Transforms.xsl"
ComponentGroupName="ProductFiles"
DirectoryRefId="INSTALLLOCATION"
KeepEmptyDirectories="false"
SuppressCom="%(HarvestDirectory.SuppressCom)"
SuppressRootDirectory="true"
SuppressRegistry="%(HarvestDirectory.SuppressRegistry)">
</HeatDirectory>
blah..
</Target>
<Target Name="AfterBuild">
blah..
</Target>
</Project>
无论我尝试什么都会导致“错误“HeatDirectory”任务没有为所需参数“Directory”提供值。
有人可以帮我解决这个问题吗?提前谢谢...
迪迪埃