Skip to content

Service registration fails #2852

Open
Open

Description

ASP.NET Core API service registration of Application Insights classes is not completed correctly and the API requests fail with the following message: Unable to resolve service for type 'Microsoft.ApplicationInsights.TelemetryClient'.
TelemetryClient is a dependency of a class in the API.
Application Insights was registered with the IServiceCollection extension method AddApplicationInsightsTelemetry.
Version of package Microsoft.ApplicationInsights.AspNetCore is 2.22.0.

The error started occurring after updating another API dependency Microsoft.Extensions.Http.Resilience to version 8.2.0.
I'm guessing that the error has something to do with this change in the service collection dotnet/runtime#64427. There have been service collection usage errors in other Microsoft packages as well after the change (e.g. Microsoft.Identity.Web: AzureAD/microsoft-identity-web#2676).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions