Reputation: 1
I have multiple projects in solution file - Proj1, Proj2, Proj3, Proj4.... The projects have cross references. Proj1 and Proj2 have references to Proj4. Proj4 has reference to Proj3 and so on. They are all compiled against .Net Framework 4.6.2+. Now I am trying to use WiX v5 to build MSI.Instead of manually referencing the dll generated in bin of each of these projects in components.wxs, I am try to use Heat to Harvest them. So I have tried Heat's HarvestDirectory. But end up getting below error - error WIX00091: Duplicate File with Identifier "xxxxx" found. Access Modifiers (global, library, file, section) cannot prevent these conflicts. Ensure all your idenifiers of a given type are unique.
The bin folders of projects that have the same shared referenced dlls. Ideally we only the proj1.dll and proj2.dll and their dependencies not the referenced dlls from proj4 which needs to be harvested from bin of proj4. How do I achieve this using WiX and Heat. I am trying to avoid adding files manually.
My current wixproj looks something like this -
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<!--<EnableProjectHarvesting>true</EnableProjectHarvesting>-->
<!--<HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Heat" Version="5.0.2" />
</ItemGroup>
<ItemGroup>
<HarvestDirectory Include="../FolderA/ADOMD_Driver/bin/Release">
<ComponentGroupName>AdomdComponents</ComponentGroupName>
<DirectoryRefId>BinFolder</DirectoryRefId>
<SuppressRegistry>true</SuppressRegistry>
<SuppressRootDirectory>true</SuppressRootDirectory>
<HarvestDirectoryTransforms>"Filter.xslt"</HarvestDirectoryTransforms>
</HarvestDirectory>
<HarvestDirectory Include="../FolderA/DataDirect_Driver/bin/Release">
<ComponentGroupName>DataDirectComponents</ComponentGroupName>
<DirectoryRefId>BinFolder</DirectoryRefId>
<SuppressRegistry>true</SuppressRegistry>
<SuppressRootDirectory>true</SuppressRootDirectory>
<HarvestDirectoryTransforms>"Filter.xslt"</HarvestDirectoryTransforms>
</HarvestDirectory>
<!--<HarvestProject Include="..\FolderA\ADOMD_Driver\ADOMD_Driver.csproj" ProjectOutputGroups="Binaries;Content;" />-->
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FolderA\ADOMD_Driver\ADOMD_Driver.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\FolderA\DataDirect_Driver\DataDirect_Driver.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\FolderA\DB2_Driver\DB2_Driver.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\FolderA\DDDB2_Driver\DDDB2_Driver.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\Configuration\Configuration.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\Core\Core.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\Encrypter\Encrypter.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\RoleParser\RoleParser.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\ServerCore\Server.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\SmartThreadPool\SmartThreadPool.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\ProductHealthCheck\ProductHealthCheck.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\ProductServiceWrite\ProductServiceWrite.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\ProductService\ProductService.csproj" DoNotHarvest="true" />
<ProjectReference Include="..\ProductWCFService\ProductWCFService.csproj" DoNotHarvest="true" />
</ItemGroup>
</Project>
Upvotes: 0
Views: 28