4

我正在使用带有功能树 UI 的 Wix3 测试版。我将几个程序集作为单独的组件安装到 ProgramFiles 内的自定义子目录以及 GAC 中。此外,我想将相同程序集的调试版本打包为一个组件,并让用户决定是否安装它们。现在这个带有调试程序集的功能默认是禁用的,但无论如何都会安装调试程序集。

在相关片段下方:

<DirectoryRef Id="INSTALLDIR">
  <Directory Id="bin" Name="bin">
    <Directory Id="Debug" Name="Debug">
      <Component Id="DebugComponent" Guid="PUT-GUID-HERE">
        <File Id="DebugAssemblyXXX" DiskId="1" Source="Debug\XXX.dll"></File>
      </Component>
    </Directory>
    <Directory Id="Release" Name="Release">
      <Component Id="ReleaseComponent" Guid="PUT-GUID-HERE">
        <File Id="ReleaseAssemblyXXX" DiskId="1" Source="Release\XXX.dll"></File>
      </Component>
    </Directory>
  </Directory>
</DirectoryRef>

<Feature Id="All" ConfigurableDirectory="INSTALLDIR" Title="Title" Level="1"
         Display="expand" AllowAdvertise="no" Absent="disallow" Description="Desc">

  <Feature Id="DebugAssemblies" Title="Debug Assemblies" Level="1000" Absent="allow"
           AllowAdvertise="no" Description="Debug versions of assemblies.">
    <ComponentRef Id="DebugComponent" />
  </Feature>

  <Feature Id="ReleaseFeature1" Title="Feature" Level="3"
           AllowAdvertise="no" Description="Another description">
    <ComponentRef Id="ReleaseComponent"/>
  </Feature>
</Feature>

奇怪的是,如果我再次运行 msi 文件并转到“更改”并禁用调试功能,调试程序集将被删除,例如这次逻辑工作正常。

默认 INSTALLLEVEL 为 3。

有什么建议么?

4

1 回答 1

7

万一其他人对此感到困惑:显然顶级功能不应该像我的情况那样命名为“全部” - 它可能对 Wix/Windows Installer 有一些默认含义。将其重命名为其他名称后,一切都按预期工作。

于 2009-03-17T09:17:14.577 回答