#1
|
|||
|
|||
Transform XML Log error during chained builds
I have logging set to XML so that I can use the handy "Transform XML Log" action at the end of my builds. However, this does not work with chained builds. The problem is that the XML in the log file is not "well-formed" when doing nested builds.
To reproduce, simply add a "Transform XML Log" action to the end of the Chain.bld example. |
#2
|
|||
|
|||
Part of the Chain.bld sample demonstrates parallel builds, and if the chained parallel builds write to the same XML log file as each other and/or the calling project, the log file will not be well-formed (since the output for the master project and each parallel child project will be interleaved in the log file). Parallel builds need to use distinct log files.
If a master project chains to a single project and waits for it to complete, both projects can write to the same log file without a problem. |
#3
|
|||
|
|||
Seeing this problem in VStudio.bld too
Well, I'm also seeing this problem in the VStudio.bld example, if I delete the database directory created by the "Create Database" step, thereby forcing a chained build.
|
#4
|
|||
|
|||
It works ok here. Try deleting your log file and building again.
|
#5
|
|||
|
|||
I tried that, and I still have a problem. But I left out a step in my last post. I would like to see all of the output from the "Create Database" chain call (not just the 1 line summary). So, under Step Properties --> Options for this step, I set the Log file field to %LOGFILE%. This (I thought) was necessary to capture the output from the chained "Create Database" build step.
Is there any way to have a master build that simply chains a number of smaller builds but contains the complete build output in a single XML log file? This doesn't seem to work in the examples I've seen. |
#6
|
|||
|
|||
You also need to check the 'Include nested (chained) build steps' on the Transform tab of the Transform XML Log action to get that information in the report.
BTW, there is a bug in the stylesheet for that functionality that caused the wrong nested steps to be output if the log contained multiple builds (this bug was reported by another user yesterday -- synchronicity is amazing); building the attached .bld file will correct it. |
#7
|
|||
|
|||
Thanks for the quick response. Much appreciated.
I have applied the patch, deleted my old log file, and yet I'm still having the same problem. But I may be doing something else wrong. Here's what I'm doing: 1) Running VStudio.bld 2) Changed first chained step, Create Database, as follows: 2.a) Selected "Always build this step" (General tab) 2.b) Checked "Capture Output" (Project tab) 2.c) Set Log File to %LOGFILE% (Options tab) 3) Checked the 'Include nested (chained) build steps' on the Transform tab of the Transform XML Log action. The result is a log file that is not "well-formed". See attached. If I rename this file to VStudio.xml and edit it in Visual Studio 2005, it shows me the XML errors. Any ideas? Am I doing something wrong? |
#8
|
|||
|
|||
Your log file is missing the opening tags for VStudio.bld. You don't have Tools | Application Options | Delete log file at the start of each build' check by chance?
http://www.visualbuild.com/Manual/loggingopt.htm |
#9
|
|||
|
|||
Indeed I do have that option selected. De-selecting that option fixes it.
That helps a lot! Thanks! |
|
|