-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
ResolveServiceProviderFactory should work with Minimal Hosting #31861
Comments
@shirhatti also Microsoft.AspNetCore.Mvc.Testing depends on that |
Thanks for contacting us. |
I'm wondering if we could use a startup hook to enable this somehow, rather than boilerplate code that must be in the app for it to work. Alternatively, could we use a source generator that's enabled by the invoking tool (e.g. |
I had an idea that we could use a diagnostic source for this but that won't work since this pattern basically wants a public API that is callable. aspnetcore/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs Lines 339 to 347 in fdd687b
These rely on a callable entrypoint. |
Actually we might still be able to do this. |
This is fixed by
WebApplicationFactory support |
Tools like EF migration rely on
Program.CreateDefaultBuilder()
at build-time to build the service container and resolve services (like DbContext).https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs
The text was updated successfully, but these errors were encountered: