Skip to content

Comments

Fixes #2448#2449

Merged
jmprieur merged 1 commit intomasterfrom
jmprieur/fix2448
Sep 7, 2023
Merged

Fixes #2448#2449
jmprieur merged 1 commit intomasterfrom
jmprieur/fix2448

Conversation

@jmprieur
Copy link
Collaborator

@jmprieur jmprieur commented Sep 7, 2023

Fixes #2448

options.Instance = AppServicesAuthenticationInformation.Issuer;
}

Services.AddHttpClient();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, in the callback, the service collection is already readonly (the Dependency injection has happened). This is now enforced in .NET 8 rc1.

Services.AddHttpClient() needs to move outside of the callback

Copy link
Collaborator

@jennyf19 jennyf19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jmprieur jmprieur merged commit e7d7d4e into master Sep 7, 2023
@jmprieur jmprieur deleted the jmprieur/fix2448 branch October 12, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.InvalidOperationException: The service collection cannot be modified because it is read-only. on .NET 8 rc1

2 participants