# DotNetAnalyzers/StyleCopAnalyzers: 500 forks, a 2023 beta, and 472 open issues

> The StyleCop rules rebuilt on the Roslyn compiler platform, MIT licensed and shipped through NuGet. The repository was pushed on 2026-10-06 but the newest release is still 1.2.0-beta.556 from December 2023, and the README's install instructions date from the Visual Studio 2015 era.

**DotNetAnalyzers/StyleCopAnalyzers** — An implementation of StyleCop rules using the .NET Compiler Platform

- Repository: https://github.com/DotNetAnalyzers/StyleCopAnalyzers
- Stars: 2,856 · Forks: 508
- Language: C#
- License: MIT
- Published: 2026-10-08 · Updated: 2026-10-08 · Language: en
- Canonical page: https://hysenlabs.com/projects/dotnetanalyzers-stylecopanalyzers

## What changed when StyleCop moved onto Roslyn

StyleCop Analyzers is a reimplementation of the StyleCop rules on the .NET Compiler Platform. The repository description says the same thing in fewer words, and the consequence is the reason this project exists as a separate artifact from the original StyleCop. Analyzers run inside the compiler rather than as a separate pass, which means violations appear in the editor as you type and code fixes can be offered inline, and the README's stated goal is to provide those fixes wherever possible.

The rule identity is the thing that survives the move. Rules keep their SA numbers, so SA1011, SA1202, SA1308, SA1642 and the rest mean the same thing here as they did in StyleCop Classic, and the reasoning behind each one lives in DOCUMENTATION.md. That continuity is why 508 forks of this repository exist: the package is widely embedded in .NET builds, and migrating away from it means editing project files across a solution.

## Installing is one PowerShell line, written for an older Visual Studio

The Installation section gives two paths. The command line route is a single command:

```bash
Install-Package StyleCop.Analyzers
```

The package manager route is a screenshot rather than text, and the sentence introducing it says NuGet Package Manager in Visual Studio 2015. That is the tell on this README. NuGet Package Manager was merged into the Visual Studio extension model years ago, and the install-a-package control in current Visual Studio versions looks nothing like the image in the README. The command still works in the Package Manager Console, which is the console where Install-Package lives, so the guidance is correct about mechanism and dated about interface.

The opening of the Using section is more current. It says the preferable way to use the analyzers is to add the NuGet package to the project where you want to enforce the rules, which is the right advice for a build you own. It reads as a contrast with the alternative of vendoring a rules assembly into your build output, which older StyleCop users did.

## The version table tells you what your compiler can handle

The README is explicit that not every StyleCop.Analyzers version supports every C# language version, and gives a three-row table of minimum versions. C# 1.0 through 6.0 needs v1.0.2 or higher on VS2015 or later. C# 7.0 through 7.3 needs v1.1.0-beta or higher on VS2017 or later. C# 8.0 needs v1.2.0-beta or higher on VS2019.

Read the middle column and you notice something the prose does not flag: two of the three rows call for a beta. The stable line effectively stops at v1.0.2, which covers everything up to C# 6. Anyone using records, file-scoped namespaces, nullable reference types or anything else introduced after C# 6 is necessarily consuming a beta package. That is not disqualifying, but it should be a decision rather than an accident, and it explains a lot about the 472 open issues.

The tree shows the same two-era split in the tooling. There is a global.json pinning an SDK, NuGet.config, init.ps1 for bootstrapping, and both appveyor.yml and azure-pipelines.yml, so two CI systems are configured for one project.

## Two ways to configure, and one that is explicitly unsupported

Configuration is where StyleCop Classic users get stuck, and the README addresses it directly. Individual rule severities are configured with rule set files in Visual Studio 2015 or newer. Settings.StyleCop is not supported. A stylecop.json file may be used to customize the behaviour of certain rules, with documentation/Configuration.md holding the details.

So there are two configuration surfaces and they do different jobs. Rule sets are an editor and IDE concept, carried over from the older code analysis world, and they control whether a given SA rule is an error, a warning or silent. stylecop.json is the native configuration file for rule behaviour, the sort of thing that decides whether a documentation element requires certain text or how fields are ordered within a type. The unsupported line is the important one to notice early, because a stylecop.json carried over from StyleCop Classic will be silently ignored for anything it was supposed to configure, and the rules will appear to misbehave with no error to explain why.

There are two documentation locations in the tree, DOCUMENTATION.md at the root and a documentation/ directory that holds Configuration.md and KnownChanges.md. The split reflects exactly that division between what the rules mean and how you configure them.

## Current commits, stale releases, and what the status page is for

Here is the tension worth planning around. The repository was pushed on 2026-10-06, so work is landing. The newest published release is 1.2.0-beta.556 from 2023-12-20. The README's Current status section points at a separate site, dotnetanalyzers.github.io/StyleCopAnalyzers, for an up-to-date list of which rules are implemented and which have code fixes.

That external status page exists for a reason, and the reason is the same gap. When commits move faster than releases, the repository can implement a rule that your installed package does not contain. The status page is the place that reconciles the two, so treat it as the authority on what the version you have pinned actually does rather than inferring from the source tree. The December 2023 release notes read like a maintenance pass rather than a feature drop, and they tell you the shape of the work: tightening SA1011 around trailing space in switch cases, extending SA1202 to interfaces and records, fixing SA1642 for record structs, and rewriting IOperationWrapper around IOperation.

The Team Considerations paragraph is the leftover that dates the README most sharply. It explains that older Visual Studio versions can coexist with 2015 or 2017 because the analyzers disable themselves in Visual Studio 2013 or earlier, which is a real compatibility feature, and also a sentence describing a product generation that no longer ships. Both are true at once.

## Conclusion

StyleCop Analyzers is still the right way to get StyleCop rules into a modern .NET build, because the alternative for most teams is writing your own analyzer set and living with it. Two things to sort out before you adopt it fresh. The published package is a beta whose tag is 1.2.0-beta.556 from 2023-12-20, so pin an exact version and expect to read the rule status page at dotnetanalyzers.github.io rather than assuming the shipped set matches what you see in the repository. And read documentation/KnownChanges.md before migrating, since the README routes every StyleCop Classic user there and those differences are the ones that surface as noise in the first week.

## FAQ

### How do I install StyleCop.Analyzers?

Add the StyleCop.Analyzers NuGet package to the project where you want the rules enforced. The README gives the command line form as Install-Package StyleCop.Analyzers, and the package manager screenshot in the same section is from the Visual Studio 2015 era even though the package itself is current.

### Does stylecop.json or Settings.StyleCop work with StyleCop Analyzers?

stylecop.json works, for customizing the behaviour of certain rules, and documentation/Configuration.md covers it. Settings.StyleCop is explicitly not supported, so a settings file carried over from StyleCop Classic is ignored, which usually shows up as rules behaving as if no configuration existed.

### Which StyleCop.Analyzers version supports my C# version?

C# 1.0 through 6.0 needs v1.0.2 or higher, C# 7.0 through 7.3 needs v1.1.0-beta or higher, and C# 8.0 needs v1.2.0-beta or higher. Note that the last two rows require a beta, so anything past C# 6 means consuming a beta package. The newest published release is 1.2.0-beta.556 from 2023-12-20.

## Sources

- [DotNetAnalyzers/StyleCopAnalyzers on GitHub](https://github.com/DotNetAnalyzers/StyleCopAnalyzers)
- [Issues](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues)
- [License: MIT](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/LICENSE)
- [README](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/README.md)
- [Releases](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/dotnetanalyzers-stylecopanalyzers
