Is one of the steps in you build script changing the %LOGFILE% Macro? I *believe* (could very well be wrong), that if you change the logfile inside the build script, it will start logging half way through that step, leaving you incomplete XML. If you pass in "/logfile" in the command-line, it should fix that.
|