1

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>
EMP
  • 59,148
  • 53
  • 164
  • 220

1 Answers1

1

More likely than not this is a deficiency in the COM+ CustomAction. It probably only supports 32-bit code right now.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • Thanks, Rob. Do you have any more details, ie. do you know what needs to go into the MSI file to make it 64-bit compatible and where would I look in WiX to check what it's doing? By the way I'm using WiX 2.0, not 3.0 - forgot to mention that. – EMP Dec 17 '08 at 03:22
  • COM+ isn't something I understand deeply. That said, I think there is a bug open on WiX that the CustomAction doesn't handle 64-bit. However, if that bug is fixed, it'll only be fixed in v3.0 so I think you're going to end up pretty stuck. Sadly. – Rob Mensching Jan 13 '09 at 01:09
  • @RobMensching I do relaize that this question is old but can you tell me how to avoid changing the CLSID in the package. My dll builds with a different CLSID eveytime the version information changes. http://stackoverflow.com/questions/21002474/how-to-keep-clsid-constant-after-a-version-change-in-vs2010-binary-compatibili – AltF4_ Jan 14 '14 at 13:29