【问题标题】:How to configure Cruise Control.Net to show proper error in Web Dashboard?如何配置 Cruise Control.Net 以在 Web 仪表板中显示正确的错误?
【发布时间】:2010-08-06 09:37:00
【问题描述】:

我们已设置 Cruise Control.Net 以从源代码控制构建 .Net 项目。问题是当构建失败时,错误日志会显示一个巨大的构建 xml,我们很难找出实际的错误。如何配置巡航控制以更易读的格式显示错误?

【问题讨论】:

    标签: asp.net configuration tdd continuous-integration cruisecontrol.net


    【解决方案1】:

    确保xmllogger 包含在您的 ccnet 配置中,并尝试通过 ccnet 的 Web 仪表板查看构建结果。

    See example of failed build output.

    【讨论】:

      【解决方案2】:

      为了使其更具可读性(将项目名称与错误一起带上)

      在webdashboard/xsl/msbuild.xsl添加

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

      就在上面

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

      在&lt;xsl:template match="error"&gt; 部分。

      因此整个 msbuild.xsl 部分将是

          <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>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-03-09
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多