I'm getting the following error after upgrading my .NET 5 V3 in-process function to a .NET 6 V4 in-process function:
Scope disposed{no name} is disposed and scoped instances are disposed and no longer available.
This happens when I register a singleton object that accepts an IServiceProvider as a dependency that when invoked tries to create an instance of a service registered as scoped. The first call to this works. Every subsequent call fails with the error above. I've attached a small function app that reproduces this error.
I'm getting the following error after upgrading my .NET 5 V3 in-process function to a .NET 6 V4 in-process function:
Scope disposed{no name} is disposed and scoped instances are disposed and no longer available.
This happens when I register a singleton object that accepts an IServiceProvider as a dependency that when invoked tries to create an instance of a service registered as scoped. The first call to this works. Every subsequent call fails with the error above. I've attached a small function app that reproduces this error.
V4BugRepro.zip