-
-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.9.3 Issue with Entity Framework Core DI registrations #1006
Comments
I can confirm this issue! I ran into the same after updating from 4.9.2 to 4.9.3! |
I can confirm this issue when upgrading from 4.9.2 to 4.9.3 |
The comment has the exception as:
I do see this show up on the developer error page on the first request. On every subsequent request, the exception appears different (and this one is logged to the console during the first request, too):
Note to get the attached reproduction working, modifications need to be made:
I may not personally have time to dive into this, however we have a lot of great new @autofac/contributors on board who may be able to help out here. |
Okay, I've got a replicating unit test for this, it doesn't seem to be specific to EF, it looks like it might be related to self-referencing generics. The logging categories in EFCore do this, which is why we see the problem. So with the following types:
This test fails with the same exception:
|
Now I've got a test for it I'll look at getting a fix together. |
Changes in the pull request no longer cause an exception in the reproduction project supplied, as well as passing the new test. |
Fix available in v4.9.4 on NuGet |
TestApp-SingleDb.zip
Originally posted by @danjohnso in #972 (comment)
Moving from old issue. Repo is attached. When using the .AddEntityFrameworkSqlServer() extension for EF Core (need internal service provider for multitenant scenario), an InvalidOperation exception is thrown trying to resolve pieces for EF Core to operate. This issue does not occur in 4.9.2 and does not occur using the OOB IServiceProvider. If I do not use the internal service provider and avoid calling .AddEntityFrameworkSqlServer(), the issue goes away.
Not sure if this is an issue related to the change where I made my original comment or if this is an issue for the EF Core team to look at because of a poorly made registration. I figured I would start here since I can't reproduce with the OOB IServiceProvider.
The text was updated successfully, but these errors were encountered: