of Simple Injector added a new diagnostic warning named
Disposable Transient Components
. Unfortunately, this warning causes false-positives in case users use the RegisterWebApiControllers or RegisterMvcControllers extension methods. Technically the warning is correct, since those controllers are registered as
transient, but both frameworks ensure that controllers are disposed when the request ends.
Therefore, those methods must be able to suppress the warnings on those registrations.
This issue was initially reported