How to install .NET DLL to COM + application using MSI (WiX)

Update: It looks like this is indeed a WiX limitation - Can't add 64 bit com + component (3.0.3907.0)

I have a .NET application with an MSI installer built using WiX 2.0. The installer creates a COM + application (by the way) and installs the .NET assembly as a component into that application. This DLL is clean managed, however it calls a mixed DLL, which can be 32-bit or 64-bit. Everything works fine on a 32-bit platform. However, in 64-bit mode, COM + dllhost.exe runs as 32-bit and subsequently fails to load its own DLL. When I look in the registry, I see that the component's COM + DLL is registered under the Wow6432Node key, and I assume the dllhost is running as 32-bit.

If I use the Component Services snap-in to remove and re-add a DLL, everything is registered correctly in the "real" registry and dllhost is started as 64-bit. How do I get the installer to do the same, i.e. is it correct to register it as a 64 bit DLL? I already set the Platform Platform attribute to "x64" and set the Win64 attribute to "yes" for each component, but they 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>

      

+1


source to share


1 answer


This is most likely a flaw in COM + CustomAction. It probably only supports 32-bit code now.



+1


source







All Articles