Wix 4 Harvest Directory components file in obj folder

163 Views Asked by At

This is my vix project

<Project Sdk="WixToolset.Sdk/4.0.2">
  <PropertyGroup>
    <PreBuildEvent />
    <PostBuildEvent />
  </PropertyGroup>
    <ItemGroup>
    <HarvestDirectory Include="..\MyProject\bin\Release\net6.0">
        <ComponentGroupName>Components</ComponentGroupName>
      <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
      <SuppressRootDirectory>true</SuppressRootDirectory>
      <SuppressRegistry>true</SuppressRegistry>
      <AutogenerateGuids>true</AutogenerateGuids>
      <Transforms>ExcludeExe.xslt</Transforms>
    </HarvestDirectory>
    <BindPath Include="..\MyProject\bin\Release\net6.0" />
  </ItemGroup>
    <ItemGroup>
    <PackageReference Include="WixToolset.Heat" Version="4.0.2" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\MyProject\MyProject.csproj" />
  </ItemGroup>
</Project>

The generated component file is named _Components_dir.wxs and it is in \obj\x64\Release. How can I set to it a have a custom name and be created in my project root directory?

1

There are 1 best solutions below

0
On BEST ANSWER

The output path for the generated file from HarvestDirectory is not customizable.