Code analysis rulesets files list acceptable an unacceptable coding styles. When you perform a build in Visual Studio, build errors are returned when these rules are broken. I have added ruleset files used by Microsoft. To give an example, these rulsets expect using statements to be ordered alphabetically and builds fail if they are not. When you don't follow the rules you get the usual red underlines in Visual Studio and can use Ctrl + . to get VS to fix them automatically.
I've added file headers to all cs files. This is also required as part of the rulsets. The header is set in stylecop.json. The file header looks like:
Includes code quality improvments:
using
statements to be ordered alphabetically and builds fail if they are not. When you don't follow the rules you get the usual red underlines in Visual Studio and can useCtrl + .
to get VS to fix them automatically.stylecop.json
. The file header looks like: