Violations missed in IDE that exist using MSBuild


Following the addition of SA1650 (ElementDocumentationMustBeSpelledCorrectly) I have fixed the 2000+ violations found in our code base. This was completed using the IDE (right-click Solution -> Run StyleCop (Rescan All)).

When I then run StyleCop using MSBuild (as our CruiseControl.NET installation does) 125 violations were reported. These never appear when using the Visual Studio IDE integration. I've checked and confirmed I have no orphaned .cs files (as I believe StyleCop under MSBuild uses the directory rather than the solution to identify source files) and none of the projects are configured not to build in the Configuration Manager.

Interestingly, one of the violations using the MSBuild approach is for the word "canceled". Throughout our code base developers had used both known spellings of this word (with a single or double "l"). The IDE integration identified a large number of them and was happy when they were changed to "canceled" with the 1 "l".

My Settings.StyleCop file contains the entry <StringProperty Name="Culture">en-GB</StringProperty> to ensure UK spellings.
Closed Nov 29, 2016 at 4:31 AM by csdahlberg
Closing this work item due to its age and because development is moving to GitHub. Please open a new issue at https://github.com/StyleCop/StyleCop if this still needs to be addressed.


andyr wrote Dec 15, 2012 at 12:32 PM

Can you attach a simple zip file with a solution repro'ing the problem please? And then I'll fix it.