Skip to content
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

workaround for now for resolving with container #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dadhi
Copy link

@dadhi dadhi commented Feb 14, 2023

Hi @caoyanmin,

Indeed, there is something strange going on when you're passing the container into the UseServiceProviderFactory.
Seems like the bug that causing to not share the registrations with the final version of container (likely the problem a bit deeper).

So until the bug is fixed dadhi/DryIoc#555, you may consider using the workaround in this PR by requesting the final container back from the host:

            var host = hostBuilder.Build();

            // WORKAROUND for now!
            container = host.Services.GetService<IContainer>() as Container;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there anyway to apply ConcreteTypeDynamicRegistrations to Rules.MicrosoftDependencyInjectionRules?
1 participant