StyleCop with TFS Policy

Oct 8, 2010 at 12:23 PM

Hi!

I'm not sure if its a good place to poste this question, since its more a StyleCop forum than a TFS integration one, but still, let me expose the problem.

I added the StyleCop checkin policy rule in TFS and its working quite well with most of the projects we have. It did fail on one, and I found out what was the problem: there is a database project in the solution and it seems that the policy cannot execute correctly if its the case. If I remove the project, the check in policy executes correctly, if the project is in the solution, it fails with the folowing error (in the Policy Warning messages window) :

"Internal error in C# StyleCop integrated check-in policy
The method or operation is not implemented. "

Is there any way, other than remove the database project from the solution, to work around that bug?

Thanks

Oct 8, 2010 at 6:01 PM

Have you tried adding a "turn all rules off" Settings.StyleCop file to that particular project directory?

 

Oct 27, 2010 at 6:21 AM

You could try the TFS check-in policy I have hosted here on CodePlex. It doesn't actually look at the project file to determine what needs to be analyzed, since it can handle checking files in from outside of the IDE (using the TFS Power Tools Windows Shell integration for example). It only scans for .cs files that are being checked in and processes them against the policy StyleCop settings.

http://sourceanalysispolicy.codeplex.com

We've been using it for quite a while now at work, and haven't had any problems with it.