Closed Simble closed 1 year ago
@jeremydmiller can we use the current version of lamar as long as we don't use keyed services in .net 8/aspnet.core 8 or does lamar needed to be extended? I want to upgrade to .net 8/aspnet.core 8 when it gets released (14. november)
Br
plz fix your library it's blocking MediatR from releasing
plz fix your library it's blocking MediatR from releasing
@jbogard I'm curious, do you use KeyedServices explicitly or why isn't the current version of Lamar working (as long as you use "named registrations" instead of KeyedServices)
Br
The package explicitly excludes 8.0 in its version ranges
Lamar currently indeed restricts updating a project to .NET 8.0:
Lamar.Microsoft.DependencyInjection 12.0.1 -> Microsoft.Extensions.Options (>= 6.0.0 && < 8.0.0)
An update would be greatly appreciated.
@jeremydmiller can we use the current version of lamar as long as we don't use keyed services in .net 8/aspnet.core 8 or does lamar needed to be extended? I want to upgrade to .net 8/aspnet.core 8 when it gets released (14. november)
Br
To the best of my knowledge, yes
Folks, .NET 8 went GA yesterday. A little patience please.
https://weblogs.asp.net/ricardoperes/net-8-dependency-injection-changes-keyed-services
@Simble For the record, StructureMap/Lamar supported "keyed services" literally 20 years ago. But yes, I was already going to work on this support today for the .NET conforming container adapter.
@jeremydmiller, I'm aware of that, and been using it for years! Thanks for making it happen
The .NET DI container now has support for keyed services. See: https://weblogs.asp.net/ricardoperes/net-8-dependency-injection-changes-keyed-services
However, Lamar's ServiceRegistry does not implement the new/required interface methods yet and therefore when trying to use a keyed service, you will run in to run time error of System.InvalidOperationException with message "This service descriptor is keyed. Your service provider may not support keyed services."