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

Unable to resolve service for type 'System.Diagnostics.DiagnosticListener' while attempting to activate 'Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware' #30

Closed
sirgamut opened this issue Sep 9, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@sirgamut
Copy link

sirgamut commented Sep 9, 2020

Having some trouble whenever EntityFrameworkCore is referenced to the Web App project.

After some testing it appears to throw the exception when any middleware is attempting to retrieve a service during the ApplicationBuilder.Build call. I was able to replicate this on the sample and on a new solution.

Thought that perhaps something was getting lost amongst method invocation calls on the WebApp Startup class in the FunctionsHostStartup<>.BuildFunctionsRequestHandler handler but after stepping through the code I can't see anything.

Any help would be appreciated with this.

EntityFrameworkCore 3.1.8
NL.Serverless.AspNetCore.AzureFunctionsHost 3.0.9

@tntwist tntwist added the bug Something isn't working label Sep 10, 2020
@tntwist tntwist self-assigned this Sep 10, 2020
@tntwist
Copy link
Owner

tntwist commented Sep 10, 2020

Hi,
I can reproduce this behavior. It seems that there is an incompatible dependencie in EF Core >= 3.1.4

As you can see the Version of "System.Diagnostics.DiagnosticSource" was increased from 4.7.0 to 4.7.1 with EF Core 3.1.4

3.1.3
image

3.1.4
image

It seems that versions from EF Core > 3.1.4 are incompatible at the moment. Sorry for now the workaround will be to use EF Core 3.1.3 😞

@sirgamut
Copy link
Author

@tntwist thanks for looking into this. Following on from your findings I found an issue over at Azure/Azure-Functions#1613 which mentions this problem also. Hopefully this gets picked up and sorted soon.

@tntwist
Copy link
Owner

tntwist commented Sep 17, 2020

@stipdav Nice. I think its good to leave this issue open till it is fixed in the function runtime.

@tntwist
Copy link
Owner

tntwist commented Apr 1, 2021

Hi,
I just released a new version with support for the new isolated function worker. You could use this version in order to fix this problem. See here.

@tntwist
Copy link
Owner

tntwist commented Apr 12, 2021

Just released the nuget Package. You can upgrade now and this issue should be fixed.

@tntwist tntwist closed this as completed Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants