ApplyConfigurationsFromAssembly warns about no parameterless constructor for already added DB Configurations #35396
Labels
area-model-building
closed-out-of-scope
This is not something that will be fixed/implemented and the issue is closed.
customer-reported
I just upgraded to .NET 9 from .NET 8 and now get a new warning in my logs: "The type '{entityTypeConfig}' was found while scanning assemblies but could not instantiated because it does not have a parameterless constructor."
While I like the concept for error-catching, I get this for
UserOAuthAuthorizationDbConfiguration
even its configuration is manually added right before the call toApplyConfigurationsFromAssembly
. It requires an encryption utility, so it will never have a parameterless constructor. Consequently, the warning in the log is just noise. ;)See my
OnModelCreating
method of my DbContext class:This seems related to #19691, #32577 and #24748
I believe the
ApplyConfigurationsFromAssembly
should skip any already loaded configurations.Include provider and version information
EF Core version: 9.0.0
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL 9.0.2
Target framework: .NET 9
Operating system: Windows 11 Pro
IDE: Jetbrains Rider
The text was updated successfully, but these errors were encountered: