How to improve StyleCop in check in?

43 Views Asked by At

I have VS2012 and local tfs2012 server. I need, when I check in code, some activity check code by StyleCop.

I need that not code that doesn't pass the rules in StyleCop doesn't get send to TFS. No check-in on build time.

2

There are 2 best solutions below

0
On

You can integrate StyleCop with MSBuild so it will be run during every build of your project.

Have a look at the documentation on the StyleCop project page

0
On

You can customize your build template to use the StyleCop Activity included in the TFS Community Build Extensions. That's how I do it.