Wix安装程序和禁用的功能

lig*_*t78 4 windows-installer wix wix3

我正在使用Wix3 beta和Feature Tree UI.我将几个程序集作为单独的组件安装到ProgramFiles中的自定义子目录中,也安装到GAC中.另外,我想将相同程序集的DEBUG版本打包为一个组件,让用户决定是否安装它们.现在,默认情况下禁用调试程序集的此功能,但无论如何都会安装调试程序集.

相关代码段下方:

<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>
Run Code Online (Sandbox Code Playgroud)

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

默认的INSTALLLEVEL是3.

有什么建议?

lig*_*t78 7

如果其他人对此感到困惑:显然顶级功能不应该像我的情况一样命名为"All" - 它可能对Wix/Windows Installer有一些默认含义.将其重命名为其他内容时,一切都按预期工作.