注册组件来使用InstallShield GAC [英] Register assemblies to GAC using InstallShield

查看:315
本文介绍了注册组件来使用InstallShield GAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须要注册使用InstallSheild多个程序集海关总署,也是我需要的组件要在安装目录复制也。什么是做到这一点的最好方法是什么?此外,我需要调用regasm.exe程序集;我可以做到这一点使用InstallShield?

I have to register multiple assemblies to GAC using InstallSheild and also I need the assemblies to be copied on the INSTALLDIR also. What's the best way to do it? Also I need to call regasm.exe for an assembly; can I do this using InstallShield?

我真正需要的是必须在GAC中注册的每个组件的新的分量?

I really need a new 'component' for each assembly that has to be registered in GAC?

推荐答案

这答案假设你使用的是Windows Installer的项目类型。

This answer assumes you are using a Windows Installer project type.

1)为每个DLL文件的组成部分,使之作为密钥文件并设置目标文件夹GlobalAssemblyCache。这指示Windows安装程序使用MsiPublishAssemblies标准动作这反过来又使电话接入融合登记在GAC中的程序集。这实际上是什么GACUTIL为你做。请记住:GACUTIL是不可再发行。如果装配有配套文件,作为配套文件将它们添加到同一个组件。

1) Create a component for each DLL file, make it as the keyfile and set the destination folder to GlobalAssemblyCache. This instructs Windows Installer to use the MsiPublishAssemblies standard action which in turn makes calls into Fusion to register the assembly in the GAC. This is effectively what GACUTIL does for you. Remember: GACUTIL is not redistributable. If the assembly has companion files, add them as companion files to the same component.

2)如果你的程序集是标记有ComVisible特性,对于每个DLL创建一个组件,其标记为密钥文件,并设置.NET ComInterop为true。这将导致COM信息在生成时被提取出来,并告诉Windows安装程序使用MsiPublishAssemblies标准动作将信息写入到注册表中。注:如果您有自定义的用户code本将无法捕获组件的注册部分。这是每MSDN的 regasm / REGFILE 不执行该code路径。您必须手动将此信息输入到该组件的InstallShield的注册表视图。

2) If your assembly is ComVisible, create a component for each DLL, mark it as the keyfile and set the .NET ComInterop to true. This will cause the COM information to be extracted at build time, and tell Windows Installer to use the MsiPublishAssemblies standard action to write the information to the registry. Note: If you have custom user code in the registration section of the assembly this will not be captured. This is per MSDN that regasm /regfile does not execute this code path. You will have to manually enter this information into InstallShield's registry view for that component.

3)是的,你可以在全球和/或privatly部署强命名程序集。无论是私人人会看到或不取决于与参考装配是否有UseSpecific设置与否。

3) Yes, you can deploy a strong-named assembly both globally and/or privatly. Whether the private one will be seen or not depends on whether the assembly with the reference has UseSpecific set or not.

这篇关于注册组件来使用InstallShield GAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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