CruiseControl.Net 与 FxCop 集成

我在集成CruiseControl与FxCop的时候,由于搜索到的资料差异,前面还转载了一篇文章其中通过bat文件来配置的,在配置时也可进行参考。我是通过exec块来进行配置的。过程中参考了一位老外的经验贴,最终实践成功了。需要配置的文件同样有三(与Gendarme一样)。

A.ccnet.config(C:\Program Files\CruiseControl.NET\server)
B.dashboard.config(C:\Program Files\CruiseControl.NET\webdashboard)
C.packages.xml(C:\Program Files\CruiseControl.NET\webdashboard\packages)


++++++++++++++++++++分别介绍每个文件的配置方法的分割线++++++++++++++++++++++++++

1.FxCop在ccnet.config文件中的配置

    在ccnet.config文件中的<task></task>块中加入以下内容:

<exec>
      <executable>C:\Program Files\Microsoft FxCop 1.35\FxCopCmd.exe</executable>
      <baseDirectory>D:\myproject\dll</baseDirectory>
      <buildArgs>/p:"D:\artificial\MS.FxCop" /out:"FxCop-results.xml"</buildArgs>
      <buildTimeoutSeconds>36000</buildTimeoutSeconds>
   </exec>
    
    <merge>
        <files>
          ……
          <file>D:\ECMS\UI\XSTLogin\bin\Debug\FxCop-results.xml</file>
            <!-- Other files to merge for your build would also be included here -->
      </files>
    </merge>


2. FxCop在dashboard.config文件中的配置

<buildPlugins>
      <buildReportBuildPlugin>
        <xslFileNames>
          <xslFile>xsl\fxcop-summary_1_36.xsl</xslFile>
        </xslFileNames>
      </buildReportBuildPlugin>
      <buildLogBuildPlugin />
      <finalBuildStatusPlugin />
      <xslReportBuildPlugin description="FxCop Report" actionName="FxCopBuildReport" xslFileName="xsl\fxcop-report_1_36.xsl"/>
    </buildPlugins>

3.FxCop在package.xml文件中的配置

 <package name="FxCop Results" description="Display the results of a FxCop build." type="Plugin" file="FxCop.zip" installed="yes" />

确保此行中的installed = "yes"即可。


另外,我发现,Fxcop如果分析的DLL文件某些依赖的文件没添加进来,总是会失败,加上那些依赖项才会运行正确。


FxCop在工作的截图:


完!微笑

上一篇: 质量之匙:持续集成工具与实践——专访Thoughtworks公司Cruise产品经理 Jez Humble
下一篇: Getting Started with Continuous Integration
danqueen
博客等级 码龄21年 5粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值