You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use the keyed service with scoped lifetime, InvalidOperationException thrown with This service provider doesn't support keyed services message
System.InvalidOperationException: This service provider doesn't support keyed services.
at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService(IServiceProvider provider, Type serviceType, Object serviceKey)
at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService[T](IServiceProvider provider, Object serviceKey)
Regression?
No response
Known Workarounds
No response
Configuration
.NET 8 Preview 7, 8.0.100-preview.7.23376.3
Windows 11 x64
Other information
No response
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection
See info in area-owners.md if you want to be subscribed.
Issue Details
Description
When trying to use the keyed service with scoped lifetime, InvalidOperationException thrown with This service provider doesn't support keyed services message
System.InvalidOperationException: This service provider doesn't support keyed services.
at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService(IServiceProvider provider, Type serviceType, Object serviceKey)
at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService[T](IServiceProvider provider, Object serviceKey)
Regression?
No response
Known Workarounds
No response
Configuration
.NET 8 Preview 7, 8.0.100-preview.7.23376.3
Windows 11 x64
Description
When trying to use the keyed service with scoped lifetime,
InvalidOperationException
thrown withThis service provider doesn't support keyed services
messageReproduction Steps
Expected behavior
Output a Guid value without exception
Actual behavior
Exception with the stack trace below
Regression?
No response
Known Workarounds
No response
Configuration
.NET 8 Preview 7, 8.0.100-preview.7.23376.3
Windows 11 x64
Other information
No response
The text was updated successfully, but these errors were encountered: