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:
  • The first step is to install the StyleCop.Analyzers package into the desired projects (or entire solution) using NuGet.
  • File 1: MyRuleset.ruleset - Contains your specific rule customizations
  • File 2: stylecop.json - Configures the StyleCop analyzers process
  • Goto Project > Properties > Code Analysis.. Change the "Rule Set" to "My Ruleset" (for all build configs)
  • Edit the .csproj file, change the item entry from "None/Content" to "AdditionalFiles" e.g.
    
    <AdditionalFiles Include="..\SharedFolder\SyleCop.Analyzers-VS2015\stylecop.json">
         <Link>stylecop.json</Link>
    </AdditionalFiles>
    
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"
    }
  }
}