Category: Okategoriserade
-
FromKeyedServices returns null when used in primary constructors
TLDR; this is no longer the case. See this working example. Gives the following output Obsolete post below Today I discovered that, when using NET 8 and a service with primary constructor, the FromKeyedServicesAttribute does nothing (I assume). Perhaps the attribute is magically removed when the code is compiled. I guess that is changed to…