title: Best way to integrate StyleCop with TFS CI
body: <p>I've been doing research on how to enable source analysis for the project I'm working on and plan to use StyleCop. The setup I have is a TFS Server for source control, using TFS Continuous Integration. I want to enable source analysis for CI builds and daily builds run on the build machine, and not only for those run on developers' machines.</p>
  
  <p>Here's an article from the documentation of StyleCop that I read on the subject:
  <a href="http://blog.newagesolution.net/2008/07/how-to-use-stylecop-and-msbuild-and.html" rel="noreferrer">http://blog.newagesolution.net/2008/07/how-to-use-stylecop-and-msbuild-and.html</a>. It basically modifies the csproj file for the purpose.</p>
  
  <p>I've also read other opinions about how StyleCop should be integrated with build automation, which advise doing the same thing using build tasks:</p>
  
  <p><a href="http://blog.newagesolution.net/2008/07/how-to-use-stylecop-and-msbuild-and.html" rel="noreferrer">http://blog.newagesolution.net/2008/07/how-to-use-stylecop-and-msbuild-and.html</a>
  <a href="http://freetodev.spaces.live.com/blog/cns!EC3C8F2028D842D5!400.entry" rel="noreferrer">http://freetodev.spaces.live.com/blog/cns!EC3C8F2028D842D5!400.entry</a>.</p>
  
  <p>What are you opinions? Have you had similar projects and done something like this?</p>