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

Add Host.CreateEmptyApplicationBuilder #81728

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Feb 6, 2023

Introduce a way to create an "empty" HostApplicationBuilder that doesn't bring any optional/unnecessary dependencies into the app's closure. This has the same functional behavior as DisableDefaults=true while allowing for the unused code to be trimmed.

Also add CreateApplicationBuilder(HostApplicationBuilderSettings settings) overload to make the Host factory methods complete.

Fix #81280

Introduce a way to create an "empty" HostApplicationBuilder that doesn't bring any optional/unnecessary dependencies into the app's closure. This has the same functional behavior as DisableDefaults=true while allowing for the unused code to be trimmed.

Also add CreateApplicationBuilder(HostApplicationBuilderSettings settings) overload to make the Host factory methods complete.

Fix dotnet#81280
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Feb 6, 2023

Tagging subscribers to this area: @dotnet/area-extensions-hosting
See info in area-owners.md if you want to be subscribed.

Issue Details

Introduce a way to create an "empty" HostApplicationBuilder that doesn't bring any optional/unnecessary dependencies into the app's closure. This has the same functional behavior as DisableDefaults=true while allowing for the unused code to be trimmed.

Also add CreateApplicationBuilder(HostApplicationBuilderSettings settings) overload to make the Host factory methods complete.

Fix #81280

Author: eerhardt
Assignees: -
Labels:

area-Extensions-Hosting

Milestone: -

@eerhardt
Copy link
Member Author

eerhardt commented Feb 9, 2023

runtime (Build Libraries Test Run release coreclr windows x86 Release) failures are #74838
runtime (Build Libraries Test Run release mono linux arm64 Debug) failure is #81123

@eerhardt eerhardt merged commit 89d35ba into dotnet:main Feb 9, 2023
@eerhardt eerhardt deleted the CreateEmptyApplicationBuilder branch February 9, 2023 18:59
@ghost ghost locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Host.CreateEmptyApplicationBuilder
2 participants