How to add custom ruleset for stylecop in Visual Studio 2019?

Prabs 1 Reputation point
2021-06-29T10:59:34.067+00:00

Hi,
How to add custom ruleset(SA#) for stylecop in Visual Studio 2019?

I installed stylecop in Visual studio.
I have some specific number of stylecop rules(SA#) and I need to add these as custom rules.
Please help me on this?

Regards,
Prabs110199-stylecop.jpg

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,193 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,166 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 54,811 Reputation points
    2021-06-29T13:51:40.63+00:00

    Add the Nuget package for Stylecopanalyzers to your project. Then it is configured as already mentioned using .editorconfig.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.