Skip to content
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

Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type #14

Closed
exhesham opened this issue May 23, 2019 · 4 comments

Comments

@exhesham
Copy link

I am receiving the next error when running the Basic Demo:

[5/23/2019 12:38:21 PM] Executed 'SampleFunction' (Failed, Id=d27a090a-4ddf-4e5c-92e6-660646c81be9)
[5/23/2019 12:38:21 PM] Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'Microsoft.Azure.Functions.Samples.DependencyInjectionBasic.IGreeter' while attempting to activate 'Microsoft.Azure.Functions.Samples.DependencyInjectionBasic.SampleFunction'.
[5/23/2019 12:38:22 PM] An unhandled host error has occurred.
[5/23/2019 12:38:22 PM] Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'Microsoft.Azure.Functions.Samples.DependencyInjectionBasic.IGreeter' while attempting to activate 'Microsoft.Azure.Functions.Samples.DependencyInjectionBasic.SampleFunction'.

What am I missing?

@Ohmniox
Copy link

Ohmniox commented Jul 31, 2019

Facing the same issue, Any help?

@ErikAndreas
Copy link

Me too: Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type [redacted] while attempting to activate ...

Any input?
Azure Functions Core Tools (2.7.1633 Commit hash: 45c7d86a3bbc9ed0a80a8f4199aa7ea80ccfb24e)
Function Runtime Version: 2.0.12673.0

@ErikAndreas
Copy link

ErikAndreas commented Oct 7, 2019

@fabiocav is this same issue as e.g Azure/azure-functions-host#4939, Azure/azure-functions-host#4914 and or Azure/azure-functions-host#3399? A bit hard to follow and what's really related (type of DI and or service lifetime) as well as what is/will be fixed (by 1.0.30)?

AddHttpClient and AddDbContext (EF) seems to work just fine

@exhesham
Copy link
Author

exhesham commented Oct 8, 2019

I moved to AWS Lambda due to too much problems with Azure.

@exhesham exhesham closed this as completed Oct 8, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants