Category: Okategoriserade
-
FromKeyedServices returns null when used in primary constructors
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 on compile (note the missing attribute!) Changing from primary constructor to an ordinary constructor with no other change…