Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Msbuild Wix:多个目录的HarvestDirectory目标_Msbuild_Wix - Fatal编程技术网

Msbuild Wix:多个目录的HarvestDirectory目标

Msbuild Wix:多个目录的HarvestDirectory目标,msbuild,wix,Msbuild,Wix,我正在尝试在*.wixproj文件中获取不同的文件夹。但HeatDirectory任务只是获取最后一个目录目标。我错过了什么 这是我的代码段: <ItemGroup> <Compile Include="Components.wxs"> <Link>Components.wxs</Link> </Compile> <Compile Include="Product.wxs" /> &

我正在尝试在*.wixproj文件中获取不同的文件夹。但HeatDirectory任务只是获取最后一个目录目标。我错过了什么

这是我的代码段:

 <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>

Components.wxs
显示HarvestDirectory目标将HarvestDirectory项传递给HeatDirectory任务以从文件生成创作


非常感谢您的帮助。

我删除了HarvestDirectory项,现在使用两个HeatDirectory任务,同时生成两个单独的wxs文件,同时在编译中链接。这解决了问题……

嘿,为什么要-ve点?