-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Support specifying host configuration via WebApplication.CreateBuilder #34837
Comments
Note that the specifying assemblies as strings in |
That entire feature isn't trimming friendly, it's our version of startup hooks. We haven't done the work in .NET 6 to make ASP.NET Core trim friendly so these annotations will come en masse as part of .NET 7. |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
3 similar comments
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
@mkArtakMSFT @pranavkm is the bot broken? Why does it send this message every time I change the API? |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
1 similar comment
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
1 similar comment
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
1 similar comment
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
API feedback -> |
Background and Motivation
We've decided that it is not possible to mutate the host configuration (environment, application name, content root) after the call to
WebApplication.Create
/CreateBuilder
this simplifies the implementation as we don't need to handle the environment changing arbitrarily as this issue describes. Today the only way to change host configuration is to specify them in a command line args format which isn't very ergonomic. We should add an API that lets the user configure host configuration specifically as part of the Create/CreateBuilder call.Proposed API
Usage Examples
Alternative Designs
Args will win to allow hosts like WebApplicationFactory to override application behavior. This is important for testing.
Risks
None.
PS: I removed these options from
WebApplicationOptions
because they are super advanced and are typically controlled by the environment. We can always add them but it seems like it might be overkill here. Open to suggestions of course.Also I only changed CreateBuilder, and not Create because this is a more advanced scenario.
The text was updated successfully, but these errors were encountered: