Posts
208
Comments
1144
Trackbacks
51
MSBuild with Cruise Control .NET - Part 2 (NUnit)

In a previous post, I laid out our standard structure for MSBuild with Cruise Control.  Now I will show the details of FxCop and NUnit.

Now you want to run FxCop:
<Target Name="FxCop" DependsOnTargets="Build">
<Exec
Condition="Exists('$(CCNetWorkingDirectory)\SolutionAnalysis.FxCop')"
Command="fxcopcmd /p:&quot;$(CCNetWorkingDirectory)\SolutionAnalysis.FxCop&quot; /out:&quot;$(CCNetArtifactDirectory)\SolutionAnalysis-Fxcop.xml&quot;"
WorkingDirectory="C:\Program Files\Microsoft FxCop 1.35"
ContinueOnError="false"/>
<Message
Condition="!Exists('$(CCNetWorkingDirectory)\SolutionAnalysis.FxCop')"
Text="This solution does not contain a SolutionAnalysis.FxCop file in the solution root." />
<Message Text="TestVar = $(TestVar)"/>
</Target>

You'll notice that this is looking for a "well-known" file called "SolutionAnalysis.fxcop" location in the root of our solution.  You may have 20 projects on CCNet - this enables a standard structure across all solutions.  If it doesn't find this file, it simply skips the step via the Condition attribute on the Exec task. This Exec task simply calls

posted on Saturday, February 24, 2007 8:37 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Comment *  
Verification

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers




Google My Blog

Tag Cloud