Update: looks like this is indeed a WiX limitation - Cannot add 64bit com+ component (3.0.3907.0)
I have a .NET application with an MSI installer created using WiX 2.0. The installer creates a COM+ application (amongst other things) and installs a .NET assembly as a component into this application. This DLL is pure managed, however it calls into a mixed DLL which may be 32-bit or 64-bit. On a 32-bit platform everything works fine. On 64-bit however, the COM+ dllhost.exe process runs as 32-bit and subsequently fails to load the native DLL. When I look in the registry I can see that the COM+ component DLL has been registered under the Wow6432Node key and I presume that's why dllhost is running as 32-bit.
If I use the Component Services snap-in to remove and re-add the DLL it all gets registered properly in the "real" registry and dllhost starts as 64-bit. How do I get the installer to do the same, ie. register it properly as a 64-bit DLL? I've already set the Package Platform attribute to "x64" and set the Win64="yes" attribute for every Component, but these didn't seem to help.
The WiX source for the COM+ component looks like this:
<Component Id="C_My.Server.dll_ComPlus" Guid="0117c6c5-387a-4b67-9a7f-273d5db3affd" Win64="yes">
<File Id="F_My.Server.dll_ComPlus" Name="SERVER.DLL" LongName="My.Server.dll" Vital="yes" KeyPath="yes"
Assembly="no" DiskId="1" Source="..\Server\bin\$(var.Configuration)\" />
<pca:ComPlusApplication Id="MyServerComPlusApp" Name="My Server" RunForever="yes"
ApplicationDirectory="[INSTALLDIR]ComPlusConfig" ApplicationAccessChecksEnabled="no"
Identity="[ComPlusUserName]" Password="[ComPlusPassword]">
<pca:ComPlusAssembly Id="MyServerComPlusAssembly" DllPath="[#F_My.Server.dll_ComPlus]"
TlbPath="[#F_My.Server.tlb_ComPlus]" Type=".net" RegisterInCommit="yes">
<pca:ComPlusComponent Id="CheckInterface" CLSID="d4cf3da5-83ad-4436-b174-eccdb121a9ea" />
</pca:ComPlusAssembly>
</pca:ComPlusApplication>
</Component>