views:

708

answers:

1

I'm using Wix3 beta with Feature Tree UI. I'm installing several assemblies as separate components into a custom subdirectory inside ProgramFiles, as well as into GAC. Additionally I would like to package DEBUG versions of the same assemblies as one component and let the user decide whether to install them or not. Now this feature with debug assemblies is disabled by default, but the debug assemblies are installed regardless.

Below the relevant snippet:

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

The weird thing is that if I run the msi file again and go to "Change" and disable the Debug feature, the Debug assemblies will be deleted, e.g. the logic works fine this time.

The default INSTALLLEVEL is 3.

Any suggestions?

+2  A: 

In case somebody else gets stuck with this: apparently the top-level feature should not be named "All" as in my case - it might have some default meaning to Wix/Windows Installer. Upon renaming it to something else everything works as expected.

liggett78

related questions