Amitabh
Amitabh

Reputation: 61187

How to configure Cruise Control.Net to show proper error in Web Dashboard?

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?

Upvotes: 0

Views: 469

Answers (2)

Maslow
Maslow

Reputation: 18746

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>

Upvotes: 0

Martin Vobr
Martin Vobr

Reputation: 5813

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.

Upvotes: 2

Related Questions