views:

49

answers:

2

We have setup Cruise Control.Net to build .Net projects from source control. Problem is that when the build fails the error log shows a huge build xml and we struggle to find out the actual error. How to configure Cruise Control to show error in more readable format?

+2  A: 

Make sure that a xmllogger is included in your ccnet configuration and try viewing the build results via ccnet's web dashboard.

See example of failed build output.

Martin Vobr
A: 

To make it even more readable (bring the project name along with the error)

in webdashboard/xsl/msbuild.xsl add

<xsl:if test="parent::target/@name != ''">
            target-><xsl:value-of select="parent::target/@name" />&#160;
        </xsl:if>

just above

<xsl:if test="@file != ''" >

in the <xsl:template match="error"> section.

so as a whole msbuild.xsl section would be

    <xsl:template match="error">
    <div style="color:orangered">
            <xsl:value-of select="./../../@file" />&#160;   
        <xsl:if test="parent::target/@name != ''">
            target-><xsl:value-of select="parent::target/@name" />&#160;
        </xsl:if>   
        <xsl:if test="@file != ''" >
            <xsl:value-of select="@file"/>&#160;(<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):&#160;
        </xsl:if>
        error&#160;<xsl:value-of select="@code"/>:&#160;<xsl:value-of select="text()" />
    </div>
</xsl:template>
Maslow