67

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

3
  • can you please show us the log file. ICE30 can be caused by duplicate files in the installation.
    – Gilad
    Feb 14, 2013 at 19:01
  • Did you get to the bottom of this? I have similar issues
    – Kuffs
    Mar 8, 2013 at 8:07
  • Not really. I've removed building of the WiX project from my Debug configuration and not seen the errors yet if I compile in Release but that hasn't actually fixed the issue
    – levelnis
    Mar 8, 2013 at 8:15

6 Answers 6

63

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

6
  • 2
    Wow added it to my Setup.proj file and never had this problem again. Thank you so much was so annoying having to close visual studio, delete the temporary .msi file and reload visual studio.
    – dwp4ge
    Jan 28, 2015 at 16:41
  • 1
    This is the solution that worked for me. Many thanks!
    – Jammer
    May 25, 2015 at 22:38
  • Worked for me too. Thanks a ton!
    – nozzleman
    Mar 8, 2016 at 14:40
  • 11
    For those not sure the tag goes within the <PropertyGroup></PropertyGroup> tags at the top of the file Aug 3, 2016 at 13:34
  • 3
    Further clarification: add <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> to the first PropertyGroup in your .wixproj file.
    – Polyfun
    Nov 22, 2016 at 14:20
48

I had this issue as well and solved it in my environment.

Short answer:

Add the environment variable MSBUILDDISABLENODEREUSE=1 and restart Visual Studio

Long answer:

There was a warning during build that I first didn't see since I was too focused on the error:

Failed to delete temporary directory: C:\Users[username]\AppData\Local\Temp\5[uniqueFolderName] light.exe

I tried to remove the folder manually, but it was in use by another process.

It turns out that a lot of MSBuild.exe processes are started during build and then not closed again. You can read more about the reason for that and what you can do to change that behavior in Stack Overflow question msbuild.exe staying open, locking files.

This thread: it and the solution in this thread:

I hope this answer can help someone else.

2
  • Finally managed to get back to looking at this issue. Looks like your suggestion might have fixed the problem @limpan. I've asked the team to add the environment variable and keep an eye on things for a day or 2. If nobody has any issues then that'll do for me!
    – levelnis
    Aug 22, 2013 at 13:39
  • After further investigation it doesn't look like to have the issue for us. Other devs on the team are still reporting WiX errors after adding the environment variable so it's not completely addressed the issue
    – levelnis
    Aug 22, 2013 at 15:22
19

For ICE30: ICE Internal Error 100. API Returned: 1615, please try this and see if it works:

  1. Close all instances of Visual Studio (may be just the one that matters but just in case)
  2. Go to C:\Documents and Settings\\****user id****\\Local Settings\Temp\.
  3. Clear all the folders that look like this .. 's12qgaks'. Basically it contains the MSI files
  4. Open the solution and recompile.

Good luck!

2
  • 1
    Thanks Manu. Unfortunately I am already going through this each time, as indicated in my question.
    – levelnis
    Mar 14, 2013 at 16:02
  • For me it was just I didn't have rights to the directory even though I was administrator. I had to take ownership.
    – LCarter
    Nov 7, 2013 at 16:45
10

I too had faced same the issue. In project properties, go to Tool Settings and click Suppress ICE validation.

Enter image description here

1
  • 1
    Yeah, thanks Sunil - I had spotted that but I'd rather try and get to the root cause of the problem and not just suppress it. It isn't happening on any of the other devs' machines so it's probably something about my set up. If I can't get any concrete answers here I could suppress the validation but that's going to affect everyone when I check the project file in
    – levelnis
    Feb 21, 2013 at 7:42
3

For me MSBUILDDISABLENODEREUSE=1 (or /nr:false on command line) did not solve the problem. But <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc> did its job done.

1

I had the same issue. It turned out to be my Anti Virus software (OfficeScan) It had the intermediate files created by Light.exe locked and the validation process failed. Excluding the temp folder from virus scan or turning off ICE validation is not an acceptable solution.

If anyone has a better solution. I would like to know.

1
  • Interesting - thanks @Mathew. Unfortunately I've now left that contract so may never get to the bottom of this one...
    – levelnis
    Mar 4, 2014 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.