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.
Problem guide
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
DI010
constructors with too many meaningful dependencies.