views:

490

answers:

0

Hi, 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