-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix ServiceDescriptor access when Keyed Services are present #2676
Conversation
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.
Thanks @ReubenBond
LGTM
Can this be merged now? |
This seems like something that should be fixed sooner rather than later... |
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.
Thanks for the contribution @ReubenBond
Can this be released now or very soon at least? There is still one open feature in the release 2.17.1. Can the release be done without it? |
@vijuhe we are testing the 2.17.1. It should be out later today PST. |
Included in 2.17.1 Thanks @ReubenBond |
Fix ServiceDescriptor access when Keyed Services are present
Fixes the use of
ServiceDescriptor
for containers which have keyed services present. This can be an issue on .NET 8.0 and has been reported by some users of the library here: #2604Description
The issue is caused by unconditional access to
ServiceDescriptor.ImplementationType
and the fix is to first check whetherServiceDescriptor.ServiceKey
is set. If it is, we can safely ignore that descriptor.For more information on keyed services, see the dotnet/runtime thread here: dotnet/runtime#64427 and the PR here: dotnet/runtime#87183.
Fixes #2604