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
AddMartenStore<T> throws System.InvalidOperationException: This service descriptor is keyed. Your service provider may not support keyed services.
#2892
Closed
dystopiandev opened this issue
Jan 8, 2024
· 0 comments
· Fixed by #2905
When called on a ServiceCollection that contains keyed services, AddMartenStore throws:
Unhandled exception. System.InvalidOperationException: This service descriptor is keyed. Your service provider may not support keyed services.
at Microsoft.Extensions.DependencyInjection.ServiceDescriptor.ThrowKeyedDescriptor()
at Microsoft.Extensions.DependencyInjection.ServiceDescriptor.get_ImplementationInstance()
at Marten.MartenServiceCollectionExtensions.<>c__12`1.<AddMartenStore>b__12_0(ServiceDescriptor x)
at System.Linq.Enumerable.SelectIListIterator`2.MoveNext()
at System.Linq.Enumerable.OfTypeIterator[TResult](IEnumerable source)+MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Marten.MartenServiceCollectionExtensions.AddMartenStore[T](IServiceCollection services, Func`2 configure)
Marten: 7.0.0-beta.3
.NET SDK: 8.0.100
OS/Arch: MacOS/ARM64
The text was updated successfully, but these errors were encountered:
When called on a ServiceCollection that contains keyed services, AddMartenStore throws:
The text was updated successfully, but these errors were encountered: