Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
96 stars 62 forks source link

DryIoc Exception After Upgrading to .NET 6 and V4 #552

Closed roend83 closed 2 years ago

roend83 commented 2 years ago

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

roend83 commented 2 years ago

I moved this issue over to azure-function-host

https://github.com/Azure/azure-functions-host/issues/8330