When Microsoft released the Dynamics 365 Portals source code, one of the additions they’d made to the codebase was to use StyleCop, a tool to assist in automatically analyzing C# code for the adherence of coding style rules. StyleCop rules are run during build of a project, and rule violations are reported in the Visual Studio output and error list windows based on configurable settings, such as being reported as compilation errors, warnings, or simply informational. With a set of rules in place, a codebase can be kept to a consistent coding style standard by encouraging or forcing them to be followed.
It became apparent that StyleCop wasn’t running consistently for developers after an issue was opened to report a StyleCop rule violation. It may have been a simple configuration issue on my part, but after several failed attempts at trying to setup several Visual Studio installations to run StyleCop, I decided it would be easier and better to switch the codebase over to using a newer and recommended replacement for StyleCop, called StyleCopAnalyzers.