Steve Michelotti

C#, ASP.NET, and other stuff

  Home  |   Contact  |   Syndication    |   Login
  51 Posts | 1 Stories | 155 Comments | 52 Trackbacks

News



Tag Cloud


Archives

Post Categories

Image Galleries

Articles

Blogs

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