-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Do not allow a non-keyed service to be injected to a keyed parameter #105839
Conversation
} | ||
|
||
[Fact] | ||
public void ResolveKeyedServiceWithKeyedParameter_MissingRegistrationButWithUnkeyedService() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above tests were not failing before this PR, but this test and the other new test in "ServiceProviderContainerTests.cs" were.
...ies/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code change looks good. Thank you for marking this breaking. Let's make sure to get the breaking change doc filled along with a workaround.
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/10525564051 |
Breaking change doc at: dotnet/docs#42313 |
Fixes #102204