【问题标题】:Is it possible to have a merge module targetting the GAC?是否可以有一个针对 GAC 的合并模块?
【发布时间】:2023-04-04 07:24:01
【问题描述】:

我正在尝试找出创建安装 .NET 程序集的合并模块的最佳方法。我想允许模块的用户指定一个文件夹或 GAC。

我发现要允许定位我应该使用的文件夹并安装在 GAC 中,我必须在文件标签中设置 Assembly=".net" 和 KeyPath="yes"。

可以合并这两个还是我必须创建两个不同的合并模块?

【问题讨论】:

    标签: wix wix3 wix3.5


    【解决方案1】:

    据我所知,大致是这样的:

    <ComponentGroup Id="Assembly1">
     <Component Id="gac_Assembly1" Guid="*">
      <Condition><[CDATA[INSTALLGAC]]></Condition>
      <File Id="fil_Assembly1" . . . />
     </Component>
     <Component Id="file_Assembly1" Guid="*">
      <Condition><[CDATA[Not INSTALLGAC]]></Condition>
      <File Id="fil_Assembly1" . . . />
     </Component>
    </ComponentGroup>
    

    您应该始终 KeyPath 是组件下的一个文件。 INSTALLGAC 是 MSM 包含器可以设置的公共属性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-14
      • 2020-05-02
      • 2020-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-08
      • 1970-01-01
      相关资源
      最近更新 更多