When this page is relevant
Identify transient services implementing IDisposable or IAsyncDisposable that the container will not track or dispose automatically.
Problem guide
This rule is useful when teams are diagnosing resource leaks caused by transient disposables that look harmless in reviews.
When this page is relevant
Identify transient services implementing IDisposable or IAsyncDisposable that the container will not track or dispose automatically.
Recommended install command
dotnet add package DependencyInjection.Lifetime.Analyzers --version 2.2.2
Relevant diagnostics
DI008
transient services implementing `IDisposable`/`IAsyncDisposable` in risky patterns.