Repository for holding code analysis rules and configuration for StyleCop & other Roslyn Analyzers.
- Right click the Solution and add Cedita.ruleset and stylecop.json as Solution-level items for global inclusion.
- Edit the .csproj of each project file. For .NET Core, simply Right Click -> Edit X.csproj. For other libraries, Right Click -> Unload Project and then Right Click -> Edit X.csproj.
- Add the Code Analysis Ruleset under the initial
<PropertyGroup>:<CodeAnalysisRuleSet>..\Cedita.ruleset</CodeAnalysisRuleSet> - Add the additional file link under either an existing
<ItemGroup>or create a new one:<ItemGroup> <AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" /> </ItemGroup> - (for non .NET Core) Right Click -> Reload Solution
- Add
StyleCop.Analyzersfrom NuGet to each project in Solution:Install-Package StyleCop.Analyzers -pre - (Optional) Add
AsyncUsageAnalyzersfrom NuGet to each project in Solution:Install-Package AsyncUsageAnalyzers -Pre