wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

Wix4: HarvestFile does not generate the registry information when harvesting a 64-bit Managed .NET COM DLL #7382

Open kirazy opened 1 year ago

kirazy commented 1 year ago

4.0.0

Visual Studio Professional 2022 17.5.3

HeatWave v1

.NET Framework 4.8

N/A

Configuration: Release Platform: x64

Using WixToolset.Heat, 4.0.0. Treating warnings as errors.

I am attempting to use HarvestFile on a 64-bit managed .NET DLL to extract the COM registration information:

<PropertyGroup>
    <HarvestFileDirectoryRefId>INSTALLFOLDER</HarvestFileDirectoryRefId>
    <HarvestFileComponentGroupName>Components.Project</HarvestFileComponentGroupName>
</PropertyGroup>

<ItemGroup>
    <HarvestFile Include="..\Project\bin\x64\Release\net48\Project.dll" />
</ItemGroup>

It fails to extract from the DLL with Error 193, which suggests that it's a bitness mismatch. So, I replace the x86 files in the nuget package directory with the x64 files, straight copy and replace, and re-run the build process, no other changes. It works, and correctly gathers the registry information. I'm thinking this is either an undocumented misconfiguration on my part, or a bug.

I would expect to be able to Harvest the DLL and for it to correctly generate the Class/Registry entries.

barnson commented 1 year ago

Try using dotnet build.