How to harvest files with the same name using wix4 and Heat in VisualStudio Installer Project

26 Views Asked by At

I try to include files of two different web applications running in IIS in a wix installer project. To include all files I work with harvesting:

<ItemGroup>
  <HarvestDirectory Include="..\..\IdentityServer">
    <ComponentGroupName>IdentityServerSupportComponents</ComponentGroupName>
    <DirectoryRefId>INSTALLFOLDER_IdentityServer</DirectoryRefId>
    <SuppressRootDirectory>true</SuppressRootDirectory>
    <SuppressRegistry>true</SuppressRegistry>
  </HarvestDirectory>
  <BindPath Include="..\..\IdentityServer" />
</ItemGroup>
<ItemGroup>
  <HarvestDirectory Include="..\..\Frontend">
    <ComponentGroupName>FrontendSupportComponents</ComponentGroupName>
    <DirectoryRefId>INSTALLFOLDER_Frontend</DirectoryRefId>
    <SuppressRootDirectory>true</SuppressRootDirectory>
    <SuppressRegistry>true</SuppressRegistry>
  </HarvestDirectory>
  <BindPath Include="..\..\Frontend" />
</ItemGroup>

The problem is that both applications contain a web.config file which of course differ since on app is aps.net and the other Angular.

It seems harvesting just references one of the files and uses it for both install direcories.

When I run the Installer the angular app also gets the asp.net web.config file.

Is there a way to have both web.config files referenced?

Of course I could reference the files directly somehow, but what if there will be more similar files in future?

0

There are 0 best solutions below