-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with Microsoft.Extensions.DependencyInjection v2.2.0 #26
Comments
Having had a bit of a dig through, I don't think this can be done until Microsoft.Azure.WebJobs.Host is also upgraded to 2.2 We ran into the issue, but not after an upgrade - we were creating an entirely new project and had, as such, added a dependency on We observed the error reported above, but also
Ensuring that all ASP.NET Core references were pegged at 2.1.1 has resolved it for us for now. |
Maybe an out-of-the-box question : why not create a source-code only NuGet package ? In that way you don't need to upgrade the NuGet everytime Microsoft releases a new version from a library, |
Yes, that is probably the right approach since AF is so picky with common dependencies. I use that for our internal utilities in v1. Unfortunately it doesn't work in v2 because the runtime only picks up extensions in external dependencies and fix is not a priority Azure/Azure-Functions#972 |
It sounds like it's a priority! |
@adrianm64 So make multiple versions from
|
For those running into this issue, I found I was able to get past it by updating my Azure Functions Runtime that ships with VS for Mac to latest as of this posting
This SO post pointed me in the right direction: https://stackoverflow.com/questions/55377996/net-core-2-2-azure-function-v2-dependency-injection |
This may be a duplicate of #21, although that doesn't capture the impact.
We've just updated our project to .NET Core 2.2 / EF Core 2.2, which means the datalayer class library our Functions project references now has a dependency on Microsoft.Extensions.DependencyInjection >= 2.2.0
This causes the following error on startup:
This prevents the function from starting.
If I downgrade the data layer back to 2.1.x libraries, the error goes away. If I then add an explicit reference to Microsoft.Extensions.DependencyInjection v2.2.0 to the functions project, it comes back, so it looks like this is the culprit.
For reference, both the Function project and the class library it's referencing are netstandard2.0. My local functions runtime is 2.0.12210.0, while Azure is running 2.0.12246.0 - same issue seen in both.
The text was updated successfully, but these errors were encountered: