Open ElanHasson opened 4 months ago
The problem is caused by Microsoft.Extensions.Http.Resilience 8.2.0. As a temporary workaround, you can downgrade to 8.1.0.
Thanks. I've since updated everything and it has gone away, so not sure where it got fixed as Wolverine is now like 1.18.1 or something.
I am running into the same. @JasperFx any ideas on the fix here? I can take a stab at it if you point me in the right direction (and it's first time contributor friendly 😄)
I believe you need to check for "!x.IsKeyedService" in ServiceGraph, when building the closed generics, just before the !x.ImplementationType.IsOpenGeneric() call.
The call probably needs to be something like:
var closed = services.Where(x => x.ServiceType == serviceType && (x.IsKeyedService
? !x.KeyedImplementationType.IsOpenGeneric()
: !x.ImplementationType.IsOpenGeneric()))
.Select(Instance.For);
However, given the way Microsoft implemented these keyed services, I'm not sure this is just an workaround. That's why I didn't submit a PR, I don't fully understand the potential side effects.
Added a PR anyway, might serve as a starting point.
I found #388, which seems related.
I'm using Aspire preview 3 and targeting .net 8.
I get this error at startup:
Here are my dependencies: