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

ぃ、小莉子 提交于 2019-12-08 09:43:51

问题


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?


回答1:


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.




回答2:


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>


来源:https://stackoverflow.com/questions/3422568/how-to-configure-cruise-control-net-to-show-proper-error-in-web-dashboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!