Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX ICE validation errors

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.

If I go into my AppData\Local\Temp 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.

Has anyone else encountered this issue? The validation error codes seem to always be a combination of ICE30, ICE38, ICE64 and ICE91

Update:

As requested, here are the entries from the most recent failure:

error LGHT0204: ICE38: ICE Internal Error 1002. API Returned: 1615.
error LGHT0204: ICE38: Error 2235: /OU.AppFramework.Includes.msi, _Profile, UPDATE Directory SET _Profile=0
error LGHT0204: ICE64: ICE Internal Error 1001. API Returned: 1615.
error LGHT0204: ICE64: Error 2242: OU.AppFramework.Includes.msi, _Profile, ALTER TABLE Directory ADD _Profile SHORT TEMPORARY HOLD
error LGHT0204: ICE91: ICE Internal Error 1001. API Returned: 1615.
error LGHT0204: ICE91: Error 2242: OU.AppFramework.Includes.msi, _Profile, ALTER TABLE Directory ADD _Profile SHORT TEMPORARY HOLD

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?

Update 2:

And now we're back to over 600 errors, mostly repetition of this error:

error LGHT0204: ICE30: ICE Internal Error 100. API Returned: 1615.
error LGHT0204: ICE30: Error 2235: AppFramework.Includes.msi, _ICE30SFN, SELECT Directory_Parent, Directory, DefaultDir, _ICE30SFN, _ICE30LFN FROM Directory WHERE Directory.Directory=? AND Directory_Parent<>?

Update 3:

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:

Warning 549 The directory '\AppData\Local\Temp\2opu3hxf' is in use and cannot be deleted. light.exe

like image 674
levelnis Avatar asked Feb 14 '13 16:02

levelnis


1 Answers

Try adding <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> to your WiX project file.

We've had the same issue for a while, and tried various workarounds including deleting the temporary files and setting the msbuild environment variable. These all appeared to work for a while, but eventually (sometimes after a few days) the problem would come back again.

I noticed that on my machine devenv.exe was the process that was locking the files that light.exe was trying to delete. I also stumbled across an unrelated thread which mentioned this project setting to make the WiX tools run out of process. I thought it could be worth a try and it appears to have cured the problem for us (so far...)

like image 181
Adrian Sureshkumar Avatar answered Sep 24 '22 06:09

Adrian Sureshkumar