title: How to heat empty directory in WiX?
body: <p>Here's the cakebuild script:</p>
  
  <pre><code>  WiXHeat(Directory("../Release"), new FilePath("./xxx/Files.wxs"), WiXHarvestType.Dir, new HeatSettings
    {
      AutogeneratedGuid = true,
      ComponentGroupName = "Binaries",
      Transform = "./Filter.xslt",
      SuppressCom = true,
      SuppressFragments = true,
      SuppressRegistry = true,
      SuppressRootDirectory = true,
      PreprocessorVariable = "var.xxx.TargetDir",
      DirectoryReferenceId = "INSTALLFOLDER",
      WorkingDirectory = "./xxx_Installer",
      KeepEmptyDirectories = true,
      GenerateGuid = true,
    });
  </code></pre>
  
  <p>It uses arguments: -ke -ag -gg.</p>
  
  <p>The Files.wxs looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
      &lt;Fragment&gt;
          &lt;DirectoryRef Id="INSTALLFOLDER"&gt;
              &lt;Directory Id="dir76A8B56EDC1C4DD3CB4177F3704BC91E" Name="data"&gt;
                  &lt;Component Id="cmpE375532277DA492834892BE47B02E5DA" Guid="*" KeyPath="yes"&gt;
                      &lt;CreateFolder /&gt;
                  &lt;/Component&gt;
              &lt;/Directory&gt;
          &lt;/DirectoryRef&gt;
      &lt;/Fragment&gt;
      &lt;Fragment&gt;
          &lt;ComponentGroup Id="Binaries"&gt;
              &lt;ComponentRef Id="cmpE375532277DA492834892BE47B02E5DA" /&gt;
          &lt;/ComponentGroup&gt;
      &lt;/Fragment&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>Then Light doesn't work with Files.wxs, here's the error:</p>
  
  <blockquote>
    <p>...\Files.wxs(29) : error LGHT0230 : The Component/@Guid attribute's
    value  '*' is not valid for this component because it does not meet
    the criteria for having an automatically generated guid. Components
    using a Directory as  a KeyPath or containing ODBCDataSource child
    elements cannot use an automatically generated guid. Make sure your
    component doesn't have a Directory a s the KeyPath and move any
    ODBCDataSource child elements to components with explicit component
    guids. An error occured when executing task 'BuildInstaller'. Error:
    Light: Process returned an error (exit code 230).</p>
  </blockquote>
  
  <p>Seems that for empty directory, it must have an assigned guild, not "*" according to <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-ke-error-empty-directories-td7586127.html" rel="nofollow noreferrer">this article</a>.</p>
  
  <p>I don't want to manually replace "*" with a GUID, since the heat/light process is integrated with build process and Files.wxs is in source control.</p>
  
  <p>Do you know how to fix this error?</p>