Latest release

2.18.24

2026-07-17

Upgrade

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

Open on NuGet

Release workflow output

This page is generated from CHANGELOG.md so GitHub Releases, the docs site, and package surfaces all stay aligned on the same release narrative.

Fixed

  • DI021/DI022 non-generic captured-scope resolutions — concurrent-handler analysis now recognizes exact framework IServiceProvider.GetService(typeof(T)) and GetRequiredService(typeof(T)) requests made through a scope or provider captured outside the handler. Literal typeof(T) is required, direct-static ordinal recovery is restricted to exact framework extension containers, and concrete provider implementations bind the requested type by semantic parameter type rather than parameter spelling. Provider-origin tracing preserves built-in identity, reference, and boxing conversions so existing generic/keyed resolution through captured value-type and IServiceProvider-constrained providers remains covered; constraint traversal is cycle-safe for temporarily invalid editor code. Runtime Type values, user-defined conversions on either the requested type or provider receiver, user-defined same-named helpers, and scopes created inside the handler remain silent.