title: Why does WiX complain that my directory isn't listed in the RemoveFile table?
body: <p>I have this WiX source, which is intended to create a shortcut on the start menu. This is based on the example in the WiX docs at <a href="https://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_start_menu_shortcut.html#:%7E:text=How%20To%3A%20Create%20a%20Shortcut%20on%20the%20Start,3%20Tell%20Windows%20Installer%20to%20install%20the%20shortcut" rel="nofollow noreferrer">https://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_start_menu_shortcut.html#:~:text=How%20To%3A%20Create%20a%20Shortcut%20on%20the%20Start,3%20Tell%20Windows%20Installer%20to%20install%20the%20shortcut</a></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;&gt;
      &lt;?include $(sys.CURRENTDIR)\Config.wxi?&gt;
      &lt;Fragment&gt;
          &lt;DirectoryRef Id=&quot;dirStartMenuFolder&quot;&gt;
              &lt;Component Id=&quot;cMyShortcut&quot; Guid=&quot;my-guid&quot;&gt;
                  &lt;Shortcut Id=&quot;shMyShortcut&quot;
                          Name=&quot;MyApp&quot; 
                          Description=&quot;My Great App&quot;
                          Target=&quot;[#fMyApp]&quot; WorkingDirectory=&quot;dirIniFolder&quot; /&gt;
                  &lt;RegistryValue Root=&quot;HKCU&quot; Key=&quot;Software\$(var.Manufacturer)\$(var.ProductName)&quot; Name=&quot;InstalledMyShortcut&quot; Type=&quot;integer&quot; Value=&quot;1&quot; KeyPath=&quot;yes&quot; /&gt;
                  &lt;RemoveFolder Id=&quot;rmStartMenuFolder&quot; Directory=&quot;dirStartMenuFolder&quot; On=&quot;uninstall&quot; /&gt;
              &lt;/Component&gt;
          &lt;/DirectoryRef&gt;
      &lt;/Fragment&gt;
  &lt;/Wix&gt;
  </code></pre>
  <p><code>Candle.exe</code> is OK with this, but <code>Light.exe</code> complains as follows:</p>
  <blockquote>
  <p>D:...\Installer\Directories.wxs(27) : error LGHT0204 : ICE64: The directory dirStartMenuFolder is in the user profile but is not listed in the RemoveFile table.</p>
  </blockquote>
  <p>I'm a bit dumbfounded by that, because the directory has an explicit <code>&lt;RemoveFolder&gt;</code> element.</p>
  <p>Any ideas?</p>