When registering types from an assembly with, RegisterAssemblyTypesI notice that it does not exist PreserveExistingDefaults, as when registering a single type.
I solved this by adding a configuration action to the registration, changing each registration to keep the default values:
var rb = builder.RegisterAssemblyTypes(...);
rb.ActivatorData.ConfigurationActions.Add((t, r) => r.PreserveExistingDefaults());
The question is that I missed some obvious function already implemented? Or should I pass the appropriate extension method to the project :)
source
share