Wix-ComPlusAssembly-无法安装类型库 [英] Wix - ComPlusAssembly - Could not install type library

查看:101
本文介绍了Wix-ComPlusAssembly-无法安装类型库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Wix的新手,我遇到了一个问题,我自己显然无法解决,因此将不胜感激.

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.

快速背景: 我代表一个软件供应商,该软件供应商构建了一套完整的基于SOA的应用程序套件,以便在大型企业中进行部署.我们的体系结构由可以独立安装/升级的许多层组成,所以我正在构建几个安装程序,这些安装程序是从头开始组成的(例如:平台,核心框架组件,服务层,业务层,应用程序层等).

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

软件版本:
-Wix 3.5.1309.0(wix.dll)
-Visual Studio 2008,.Net 3.5
-Build OS:Windows 2008 R2 Standard 64位
-部署操作系统:Windows 2008 Standard 32位

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

我的问题是关于在COM +应用程序中安装.Net程序集.我不断收到错误消息无法安装类型库".我已经阅读了所有可以找到的文档,并且已经在google上搜索了几天.我找到了很多关于该主题的帖子,但仍然无法解决该问题.

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.

要找出问题,我已将问题提取到单独的安装程序中.首先,我运行主安装程序:
1.将所有程序集安装到GAC中,包括要在COM +中安装的程序集.
2.创建本地用户和组.
3.创建目标COM +应用程序,包括角色等.
4.在文件夹中安装目标程序集和配套的typelib(以消除所有GAC查找问题)

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.

然后,我运行仅包含问题的最小安装程序,尝试执行以下操作:
1.参照预先安装的.dll和.tlb,将程序集安装在现有的COM +应用程序(服务器)中.

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.  

我还注意到,回滚删除了COM +应用程序,即使它不是由该安装程序创建的.
我可以使用服务器管理器从安装程序引用的同一物理文件中手动安装该程序集.从COM +应用程序中手动删除该组件后,安装程序将起作用!

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!

而且,为什么我必须首先提供typelib?无论如何,EnterpriseServices.RegistrationHelper都会动态生成typelib.

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

推荐答案

我有同样的问题.香港专业教育学院尝试过Wix 3.5和3.6.2012.0,它还没有工作.如果

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. 我先使用regsvcs
  2. 删除组件
  3. 运行msi并在出现有关已存在的应用程序的消息时单击忽略"

您设法找到解决方案了吗?

Did you manage to find a solution?

这篇关于Wix-ComPlusAssembly-无法安装类型库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆