Problem guide

Spot Constructor Over-Injection Early

This rule is intentionally softer than runtime-failure diagnostics, but it is useful for preventing DI-heavy classes from becoming maintenance hotspots.

When this page is relevant

Find classes that are accumulating too many constructor dependencies so SRP drift shows up in IDE diagnostics and CI instead of code-review debates.

Recommended install command

dotnet add package DependencyInjection.Lifetime.Analyzers --version 2.2.2

Relevant diagnostics

The rules that cover this failure mode