Take the 2-minute tour ×

we use StyleCop and it checks whether each source file has our copyright header. This is fine till I add an opensource file with its own header, and the two now are conflicting. How can I turn off Stylecop check for particular files and messagetypes in project?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you want StyleCop to completely ignore these files, you can add ExcludeFromStyleCop elements within your .csproj file as described at http://stylecop.codeplex.com/wikipage?title=Using%20StyleCop%20on%20Legacy%20Projects.

If you want to deactivate only certain rules for these files, this can be done by adding a SourceFileList section to your StyleCop.settings files as described at http://stylecop.codeplex.com/wikipage?title=Using%20File%20Lists.

share|improve this answer

Your Answer


