Settings file for MSBuild Integration

Jun 23, 2011 at 7:23 PM

When using StyleCop with MSBuild integration, I was wondering if there was a Settings file associated with the build.  That is, I want to disable some of the rules for StyleCop, but I am limited by the fact that I use VS 2010 Express (and thus must use MSBuild integration).  I don't want to place suppression attributes on every single class- that would not be worth having StyleCop in the first place.  Any suggestions?

Forgive me if this was in some obvious place in the documentation/forum, but I'm having difficulty finding it.

Jun 30, 2011 at 3:27 PM

Well?  I'm certain this is an easy question to answer...

Coordinator
Jun 30, 2011 at 3:34 PM

Sorry, I was busy shipping 4.5.

Settings files are looked for in the same folder as the .cs file being analysed. If it can'd find one there it looks in the parent folder, then its parent and so on up to the root of the drive.

Jun 30, 2011 at 3:51 PM

That's fine - I understand that.  I tried what you suggested, and it worked great.  Thanks!  Maybe at some point, when you have some extra time, you could add that to the documentation on the MSBuild page: http://stylecop.codeplex.com/wikipage?title=Setting%20Up%20StyleCop%20MSBuild%20Integration&referringTitle=Documentation

 

Just a thought.  But thanks again!

Coordinator
Jun 30, 2011 at 3:59 PM

Done. I've added it to the doc.

Jun 30, 2011 at 4:47 PM

Great!  Thanks!  Oh... you mis-spelled can't.

Coordinator
Jun 30, 2011 at 4:53 PM

Fixed.