开发者

FXcop and Msbuild with CruiseControl.NET

I'm new so please bear with me. I would like to know how to have MSbuild and FXcop run over night and to inform the users if they fail without finishing. I have been told they both can be integrated into CruiseControl.NET. I'm currently going to look to see if CruiseControl.NET has the ability to inform the users of a failed build. (As in only half way done due to an error). If anyone has been able to do this easily it will be wonderful if you can walk me thought it or lead me to the documents.

Thanks for your time,Dennis Hayden. Sle开发者_StackOverflowepking


You can use <MsBuild> task to build your project. MsBuild is available inside task section.

<msbuild>
      <executable>
        C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe
      </executable>
      <workingDirectory>
        project path
      </workingDirectory>
      <projectFile>project.sln</projectFile>
      <buildArgs>
        /noconsolelogger
        /p:Configuration=Release
      </buildArgs>
      <targets>Build</targets>
      <timeout>900</timeout>
      <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>

    </msbuild>

In task section there is an <exec> tag which can be used to run FxCop.

   <exec>
          <executable>c:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe</executable>
          <baseDirectory>project path</baseDirectory>
          <buildTimeoutSeconds>300</buildTimeoutSeconds>
 </exec>

please check the following links

ccnet1 and ccnet2


In the Tasks section of the documentation, you should see an entry for MsBuild. To run FxCop, you can either run it through MsBuild, or use the Executable task.


There is also a nice collection of MSBuild Community Tasks that have support for FxCop as well as a whole suite of other tools that come in handy when creating a CI environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜