[Source: http://geekswithblogs.net/EltonStoneman]
Running Wix 3.0.2420.0 I got an "object reference not set" and this error message when calling light.exe from an Exec MSBuild task:
The command ""..\bin\Wix\light" -out "c:\x\y\z\x.y.z.msi" "c:\x\y\z\x.y.z.wixobj" -ext WixIIsExtension -ext WixUiExtension -cultures:en-us" exited with code -532459699.
Annoyingly, I could run the exact same command in a command prompt immediately after the build failed, and it worked fine - and this error only happened on the build server and not on the dev boxes.
Before diving into it too much, I updated to the latest version of Wix (currently 3.0.4318.0) and the problem went away. So that solved that issue and just left me with "should we be using beta software even if it works for everything we need at the moment"…