Skip to content

Using DryIoc ASP.NET Core MVC (.NET 5) #398

Answered by dadhi
timrhaynes asked this question in Q&A
Discussion options

You must be logged in to vote

One thing that frustrates me is that in my IServiceProviderFactory.CreateBuilder implementation, I cannot return DIContainer, for the Main method to use when invoking HostBuilder.Build()

I am not sure about this problem, because HostBuilder still has the UseServiceFactoryProvider method:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.hostbuilder.useserviceproviderfactory?view=dotnet-plat-ext-5.0#Microsoft_Extensions_Hosting_HostBuilder_UseServiceProviderFactory__1_Microsoft_Extensions_DependencyInjection_IServiceProviderFactory___0__
so you may return new DryIocServiceProviderFactory(...).

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@dadhi
Comment options

dadhi May 8, 2021
Maintainer

@timrhaynes
Comment options

@dadhi
Comment options

@timrhaynes
Comment options

@dadhi
Comment options

Answer selected by timrhaynes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants