2010-02-01 62 views
3

我是Wix的新手,我遇到了一個顯然無法自行解決的問題,因此非常感謝您的幫助。Wix - ComPlusAssembly - 無法安裝類型庫

快速背景: 我代表一家軟件供應商構建一套全面的基於SOA的應用程序,用於在大型企業中部署。我們的架構由多個可獨立安裝/升級的層組成,因此我構建了幾個安裝程序,從頭開始構建(如:平臺,核心框架組件,服務層,業務層,應用程序層等)。

軟件版本:
-Wix 3.5.1309.0(wix.dll)
- Visual Studio 2008中,NET 3.5的
- 建立操作系統:Windows 2008 R2標準版64位
- 部署操作系統:Windows 2008標準32位

我的問題是關於在COM +應用程序中安裝.Net程序集。我一直在收到錯誤「無法安裝類型庫」。我一直在閱讀我所能找到的所有文檔,而且我現在一直在google幾天。我在這個主題上發現了很多帖子,但我仍然無法解決這個問題。

要隔離問題,我已將問題提取到單獨的安裝程序中。首先,我運行主安裝程序:
1.將所有組件安裝到GAC中,包括要在COM +中安裝的組件。
2.創建本地用戶和組。
3.創建目標COM +應用程序,包括角色等
4.安裝目標組件和同伴類型庫,一個文件夾中(以消除任何GAC查找問題)

此安裝程序,我可以安裝/修復/卸載,一切工作正常。

然後我運行僅含有問題,它試圖最小安裝程序:
1.在現有的COM +應用程序(服務器)安裝組件,它引用了預裝.dll和.TLB。

安裝失敗,並且日誌中顯示:

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. 

我也注意到回滾刪除COM +應用程序,即使它不是由這個安裝程序創建。
我可以使用服務器管理器從安裝程序引用的同一物理文件手動安裝程序集。從COM +應用程序中手動刪除組件後,安裝程序運行!

此外,爲什麼我必須首先提供typelib? EnterpriseServices.RegistrationHelper無論如何都會動態生成typelib。

這是起碼的測試安裝程序,失敗:

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

乾杯,
-Nils

+0

您是否找到解決方案? – sventevit 2011-12-09 15:10:32

回答

0

首先,你可以嘗試升級到V3.5維克斯的最新版本。最後在COM +中有一些錯誤修復。如果這不起作用,請查看open bugs around COM+。由於COM +的複雜性,安裝代碼存在一些已知問題。

如果這些bug中的任何一個聽起來適用,也許你可以幫助解決他們與社區?

1

我有同樣的問題。我曾嘗試過Wix 3.5和3.6.2012.0,但它也沒有使用過。它的工作原理,如果

  1. 我使用regsvcs第一
  2. 刪除組件
  3. 運行MSI,當消息出現時大約已有

你設法找到該應用程序上忽略點擊一個辦法?