Wix - ComPlusAssembly - Could not install type library

3

I'm new to Wix and I have ran into a problem that I'm obviously not able to solve on my own, so any help will be very much appreciated.

Quick background: I'm representing a software vendor building a comprehensive suite of SOA based applications for deployment in large enterprises. Our architecture consists of many layers which may be installed/upgraded independently, so I'm building several installers, composing from the ground up (like: platform, core framework components, service layer, business layer, application layer, etc.).

Software versions:
-Wix 3.5.1309.0 (wix.dll)
- Visual Studio 2008, .Net 3.5
- Build OS: Windows 2008 R2 Standard 64 bit
- Deploy OS: Windows 2008 Standard 32 bit

My problem is in regards to installing .Net assemblies in COM+ applications. I keep on getting the error "Could not install type library". I have been reading all the documentation that I can find, and I have been google'ing for several days now. I find quite a few posts on the topic, but I'm still not able to resolve the issue.

To isolate the problem I have extracted the issue into a separate installer. First I run the main installer:
1. Installs all assemblies into GAC, including the one to be installed in COM+.
2. Create local users and groups.
3. Create the target COM+ application, including roles etc.
4. Installs the target assembly, and the companion typelib, in a folder (to remove any GAC lookup issues)

This installer I can install/repair/uninstall, everything works fine.

Then I run the minimum installer containing only the issue, which tries to:
1. Install the assembly in an existing COM+ application (server), referencing the pre-installed .dll and .tlb.

The install fails, and the log is showing:

MSI (s) (AC:64) [19:16:01:127]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI1BAB.tmp, Entrypoint: ComPlusInstallExecute  
ComPlusInstallExecute:  ExceptionInfo: Code='0', Source='System.EnterpriseServices', Description='Could not install type library 'c:\Program Files\MyManufacturer\ComPlus\WDA.ServiceProviders.Update.11.tlb' into application 'WDA.ServiceProviders.Update.11'.', HelpFile='', HelpContext='0'  
ComPlusInstallExecute:  Error 0x80020009: Failed to invoke RegistrationHelper.InstallAssembly() method  
ComPlusInstallExecute:  Error 0x80020009: Failed to register .NET assembly  
ComPlusInstallExecute:  Error 0x80020009: Failed to register assembly, key: MyAssembly  
ComPlusInstallExecute:  Error 0x80020009: Failed to register assemblies  
Action ended 19:16:02: InstallFinalize. Return value 3.  

I also notice that the rollback removes the COM+ application, even though it was not created by this installer.
I can install the assembly manually, using the Server Manager, from the same physical file that the installer is referencing. After manually removing the component from the COM+ application, then the installer works!

Also, why do I have to supply a typelib in the first place? The EnterpriseServices.RegistrationHelper is generating the typelib on the fly anyway.

This is the minimum test installer that is failing:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"  
     xmlns:complus="http://schemas.microsoft.com/wix/ComPlusExtension"  
>  
  <Product Id="48EDB258-BD84-47EF-94A2-B4950EE48139"  
             UpgradeCode="F29B8EBD-DFD1-4B7E-96FF-86842CAAE4A4"  
             Name="ComPlusInstalls"  
             Language="1033"  
             Version="1.0.0"  
             Manufacturer="MyManufacturer">    
    <Package Id="ABA41719-BC28-4A57-BA9A-58F4F3B2194F" InstallerVersion="200" Compressed="yes" />  
    <Media Id="1" Cabinet="WixTest.cab" EmbedCab="yes" />  
    <complus:ComPlusApplication Id="MyApplication" ApplicationId="1FCF220A-A1FE-44FE-BE91-B37341BA6D4A" />  
    <Directory Id="TARGETDIR" Name="SourceDir">  
      <Directory Id="ProgramFilesFolder">  
        <Directory Id="MyManufacturer" Name="MyManufacturer">  
          <Directory Id="INSTALLLOCATION" Name="ComPlus">  
            <Component Id="MyComponent" Guid="6D46A007-6669-487B-BAA0-DFA7314C141D" KeyPath="yes">  
              <complus:ComPlusAssembly Id="MyAssembly" Type=".net" Application="MyApplication"  
                                       RegisterInCommit="no" DllPathFromGAC="no"  
                                       DllPath="[INSTALLLOCATION]WDA.ServiceProviders.Update.11.dll"  
                                       TlbPath="[INSTALLLOCATION]WDA.ServiceProviders.Update.11.tlb"/>  
            </Component>  
          </Directory>  
        </Directory>  
      </Directory>  
    </Directory>  
    <Feature Id="MainFeature" Title="WixTest" Level="1" Absent="disallow" InstallDefault="local">  
      <ComponentRef Id="MyComponent" />  
    </Feature>  
  </Product>  
</Wix>  

Cheers,
-Nils

assemblies
wix
com+
asked on Stack Overflow Feb 1, 2010 by Nils-Petter Ottesen • edited Feb 2, 2010 by starblue

2 Answers

1

I have the same problem. Ive tried Wix 3.5 and 3.6.2012.0 and it hasnt worked with either. It works if

  1. I use regsvcs first
  2. Delete the component
  3. Run the msi and click on Ignore when a message comes up about the application already existing

Did you manage to find a solution?

answered on Stack Overflow Aug 12, 2011 by jagberg
0

First, you might try upgrading to the latest version of WiX v3.5. There were some bug fixes in COM+ at the end. If that doesn't work, take a look at the open bugs around COM+. There are a couple known issues with the installation code due to complexities in COM+.

If any of those bugs sound applicable maybe you can help fix them with the community?

answered on Stack Overflow Feb 14, 2011 by Rob Mensching

User contributions licensed under CC BY-SA 3.0