In previous versions of Visual Studio, StyleCop was an msi installation of a VS extension and a global settings file was used to configure the application (StyleCop.settings).
In VS2015, with Roslyn and Code Analysis, StyleCop comes as a NuGet package "StyleCop.Analyzers" and it requires two files to configure it (I recommend saving these two files to a common folder and adding the linked files from there in each project).
Therefore, in each project:
Example contents of the files:
MyRuleset.ruleset
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="My Ruleset" Description="My code analysis rules for StyleCop.Analyzer" ToolsVersion="14.0">
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1634" Action="None" />
<Rule Id="SA1635" Action="None" />
<Rule Id="SA1636" Action="None" />
<Rule Id="SA1637" Action="None" />
<Rule Id="SA1638" Action="None" />
<Rule Id="SA1640" Action="None" />
<Rule Id="SA1641" Action="None" />
<Rule Id="SA1652" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1516" Action="None" />
</Rules>
</RuleSet>
stylecop.json
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"companyName": "PlaceholderCompany"
},
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
}
}
}