2014-09-19 67 views
0

我试图在我的* .wixproj文件中收集不同的文件夹。但HeatDirectory任务仅收获最后一个HarvestDirectory目标。我在这里错过了什么?Wix:多个目录的HarvestDirectory目标

这里是我的代码段:

<ItemGroup> 
    <Compile Include="Components.wxs"> 
     <Link>Components.wxs</Link> 
    </Compile> 
    <Compile Include="Product.wxs" /> 
    </ItemGroup> 
    <ItemGroup> 
    <HarvestDirectory Include="$(SolutionDir)\WebApplication2\bin\$(Configuration)"> 
     <AutogenerateGuids>true</AutogenerateGuids> 
     <ComponentGroupName>SimpleWebAppGroup</ComponentGroupName> 
     <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> 
     <SuppressCom>true</SuppressCom> 
     <SuppressRegistry>true</SuppressRegistry> 
     <PreprocessorVariable>var.SourceDir</PreprocessorVariable> 
    <Visible>false</Visible> 
    </HarvestDirectory> 

    <HarvestDirectory Include="D:\testing\TTSVN\Program Files\TortoiseSVN\Common\TortoiseOverlays"> 
     <AutogenerateGuids>true</AutogenerateGuids> 
     <ComponentGroupName>SVNOverLays</ComponentGroupName> 
     <DirectoryRefId>PROGFILES</DirectoryRefId> 
     <SuppressCom>true</SuppressCom> 
     <SuppressRegistry>true</SuppressRegistry> 
     <PreprocessorVariable>var.SourceDir</PreprocessorVariable> 
     <Visible>false</Visible> 
    </HarvestDirectory> 
    </ItemGroup> 
    <Import Project="$(WixTargetsPath)" /> 
    <Target Name="BeforeBuild"> 
    <HeatDirectory NoLogo="$(HarvestDirectoryNoLogo)" 
        SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)" 
        SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)" 
        ToolPath="$(WixToolPath)" 
        TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"      TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)" 
        VerboseOutput="$(HarvestDirectoryVerboseOutput)" 
        AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)" 
        GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)" 
        OutputFile="Components.wxs" 
        SuppressFragments="$(HarvestDirectorySuppressFragments)" 
        SuppressUniqueIds="true" 
        Transforms="%(HarvestDirectory.Transforms)" 
        Directory="@(HarvestDirectory)" 
        ComponentGroupName="%(HarvestDirectory.ComponentGroupName)" 
        DirectoryRefId="%(HarvestDirectory.DirectoryRefId)" 
        KeepEmptyDirectories="false" 
        PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)" 
        SuppressCom="%(HarvestDirectory.SuppressCom)" 
        SuppressRegistry="%(HarvestDirectory.SuppressRegistry)" 
        SuppressRootDirectory="$(HarvestDirectorySuppressRootDirectory)" 
        > 

    </HeatDirectory> 
    </Target> 

如果我省略HeatDirectory的任务,它绝对不会更新Component.wxs。我没有找到任何示例显示使用HarvestDirectory与HeatDirectory任务。而Wix documentation显示HarvestDirectory目标将HarvestDirectory项目传递给HeatDirectory任务以从文件生成创作。

任何帮助将非常感激。

回答

0

我丢弃了HarvestDirectory项目,现在使用两个HeatDirectory任务,同时生成两个单独的wxs文件,同时在编译中进行链接。这解决了这个问题....