title: WiX ICE validation errors
body: <p>I'm having some strange issues with WiX on my local machine. The problem is intermittent, but after a few rebuilds of the solution, the WiX project starts throwing ICE validation errors.</p>
  
  <p>If I go into my <code>AppData\Local\Temp</code> folder and delete all the temporary folders that contain the MSI, the solution compiles again. A short while later, the problem starts happening again. Having to keep clearing down the temp folders isn't a sustainable or satisfactory solution.</p>
  
  <p>Has anyone else encountered this issue? The validation error codes seem to always be a combination of ICE30, ICE38, ICE64 and ICE91</p>
  
  <p>Update:</p>
  
  <p>As requested, here are the entries from the most recent failure:<br></p>
  
  <blockquote>
    <p>error LGHT0204: ICE38: ICE Internal Error 1002. API Returned:
    1615.<br> error LGHT0204: ICE38: Error 2235: /OU.AppFramework.Includes.msi, _Profile, UPDATE <code>Directory</code> SET
    <code>_Profile</code>=0<br> error LGHT0204: ICE64: ICE Internal Error 1001. API
    Returned: 1615.<br> error LGHT0204: ICE64: Error 2242:
    OU.AppFramework.Includes.msi, _Profile, ALTER TABLE <code>Directory</code> ADD
    <code>_Profile</code> SHORT TEMPORARY HOLD<br> error LGHT0204: ICE91: ICE
    Internal Error 1001. API Returned: 1615.<br> error LGHT0204: ICE91:
    Error 2242: OU.AppFramework.Includes.msi, _Profile, ALTER TABLE
    <code>Directory</code> ADD <code>_Profile</code> SHORT TEMPORARY HOLD</p>
  </blockquote>
  
  <p>Interestingly, this failure occurred before I left the office last night, and the solution compiled OK when I came in this morning. As it seems to centre on the temp directory where the MSI is build by WiX, could it be the build process locking the file?</p>
  
  <p>Update 2:</p>
  
  <p>And now we're back to over 600 errors, mostly repetition of this error:<br></p>
  
  <blockquote>
    <p>error LGHT0204: ICE30: ICE Internal Error 100. API Returned: 1615.<br>
    error LGHT0204: ICE30: Error 2235: AppFramework.Includes.msi,
    _ICE30SFN, SELECT <code>Directory_Parent</code>, <code>Directory</code>, <code>DefaultDir</code>, <code>_ICE30SFN</code>, <code>_ICE30LFN</code> FROM <code>Directory</code> WHERE
    <code>Directory</code>.<code>Directory</code>=? AND <code>Directory_Parent</code>&lt;>?</p>
  </blockquote>
  
  <p>Update 3:</p>
  
  <p>The problem still exists even after trying the suggestion by @limpan. There are a couple of warning given by light that are caused by the MSI output folder being locked when light tries to access the MSI:</p>
  
  <blockquote>
    <p>Warning 549 The directory '\AppData\Local\Temp\2opu3hxf' is in use and cannot be deleted. light.exe</p>
  </blockquote>