I am using the following line to generate the wxs file for registered COM
"C:\Program Files (x86)\WiX Toolset v3.10\bin\heat.exe" dir "$(SolutionDir)Output" -dr INSTALLFOLDER -cg SapFilesComp -gg -g1 -sf -srd -var "var.outputFolder" -out "$(ProjectDir)\SapHeatFiles.wxs"
It works fine, whenever I use regasm 32 bit but whenever I try to register using Regasm (64bit), I got the following error:
The TypeLib element is non-advertised and therefore requires a parent File element.
Attached the generated wxs file for both cases (I noticed that in first case "TypeLib" element is nested in the "File" element, while they are sibling in the second case):
32 bit
<Component Id="cmp876EABD23BD0B870AA62FA8F8E0FE6B8" Directory="INSTALLFOLDER" Guid="92ABC2C9-FCBC-403C-BDEF-26FBD3F7246A">
<File Id="fil45CFD89B1F7C95D68EA24CFD60BA3404" KeyPath="yes" Source="$(var.outputFolder)\SAP2000Plugin_MALI_CurveLoadV18.tlb">
<TypeLib Id="{040DE481-6BD0-4EB1-8DAC-32FC97B37E09}" Description="SAP2000 curved load plugin by Mostafa Ali" HelpDirectory="INSTALLFOLDER" Language="0" MajorVersion="2" MinorVersion="0">
<Interface Id="{DE52BD0F-3562-39A1-95E2-E55EAB5E9340}" Name="_CPlugin" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
</TypeLib>
</File>
</Component>
64 bit
<Component Id="cmp876EABD23BD0B870AA62FA8F8E0FE6B8" Directory="INSTALLFOLDER" Guid="342BA35D-063E-4C1D-9099-8AD4B78B17FA">
<File Id="fil45CFD89B1F7C95D68EA24CFD60BA3404" KeyPath="yes" Source="$(var.outputFolder)\SAP2000Plugin_MALI_CurveLoadV18.tlb" />
<RegistryValue Root="HKCR" Key="TypeLib\{040DE481-6BD0-4EB1-8DAC-32FC97B37E09}\2.0\0\win64" Value="[#fil45CFD89B1F7C95D68EA24CFD60BA3404]" Type="string" Action="write" />
<TypeLib Id="{00020430-0000-0000-C000-000000000046}" Description="OLE Automation" HelpDirectory="SystemFolder" Language="0" MajorVersion="2" MinorVersion="0">
<Interface Id="{4EF6100A-AF88-11D0-9846-00C04FC29993}" Name="FontEvents" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
<Interface Id="{7BF80981-BF32-101A-8BBB-00AA00300CAB}" Name="Picture" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
<Interface Id="{BEF6E003-A874-101A-8BBA-00AA00300CAB}" Name="Font" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
</TypeLib>
<TypeLib Id="{040DE481-6BD0-4EB1-8DAC-32FC97B37E09}" Description="SAP2000 curved load plugin by Mostafa Ali" HelpDirectory="INSTALLFOLDER" MajorVersion="2" MinorVersion="0">
<Interface Id="{DE52BD0F-3562-39A1-95E2-E55EAB5E9340}" Name="_CPlugin" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
</TypeLib>
</Component>
Thanks for your help.
Just in case someone faces the same problem, I solved the problem by manually nesting Typelib element inside the file element as follows:
<Component Id="cmp876EABD23BD0B870AA62FA8F8E0FE6B8" Directory="INSTALLFOLDER" Guid="D3FCCCC3-FEC9-41B6-9201-E01658CC20B7">
<RegistryValue Root="HKCR" Key="TypeLib\{040DE481-6BD0-4EB1-8DAC-32FC97B37E09}\2.0\0\win64" Value="[#fil45CFD89B1F7C95D68EA24CFD60BA3404]" Type="string" Action="write" />
<File Id="fil45CFD89B1F7C95D68EA24CFD60BA3404" KeyPath="yes" Source="$(var.outputFolder)\SAP2000Plugin_MALI_CurveLoadV18.tlb" >
<TypeLib Id="{00020430-0000-0000-C000-000000000046}" Description="OLE Automation" Language="0" MajorVersion="2" MinorVersion="0" >
<Interface Id="{4EF6100A-AF88-11D0-9846-00C04FC29993}" Name="FontEvents" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
<Interface Id="{7BF80981-BF32-101A-8BBB-00AA00300CAB}" Name="Picture" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
<Interface Id="{BEF6E003-A874-101A-8BBA-00AA00300CAB}" Name="Font" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
</TypeLib>
<TypeLib Id="{040DE481-6BD0-4EB1-8DAC-32FC97B37E09}" Description="SAP2000 curved load plugin by Mostafa Ali" HelpDirectory="INSTALLFOLDER" Language="0" MajorVersion="2" MinorVersion="0" >
<Interface Id="{DE52BD0F-3562-39A1-95E2-E55EAB5E9340}" Name="_CPlugin" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
</TypeLib>
</File>
</Component>