Skip to content

Conversation

wcsanders1
Copy link
Contributor

Resolves issue #97091

@ghost
Copy link

ghost commented Mar 2, 2024

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

Issue Details

Resolves issue #97091

Author: wcsanders1
Assignees: -
Labels:

area-Extensions-Hosting

Milestone: -

@steveharter steveharter self-requested a review March 7, 2024 21:33
@buyaa-n
Copy link
Contributor

buyaa-n commented May 8, 2024

@benjaminpetit could you take a look please?

@steveharter steveharter merged commit 673a664 into dotnet:main Jul 8, 2024
@ericstj ericstj added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Jul 19, 2024
@dotnet-policy-service dotnet-policy-service bot added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Jul 19, 2024
Copy link
Contributor

dotnet-policy-service bot commented Jul 19, 2024

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

public HostBuilder()
{
_serviceProviderFactory = new ServiceFactoryAdapter<IServiceCollection>(new DefaultServiceProviderFactory());
_defaultProviderFactoryUsed = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this ever set to false? Should that be done in UseServiceProviderFactory?

Copy link
Contributor Author

@wcsanders1 wcsanders1 Jul 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems to me that this field should be set to false when UseServiceProviderFactory is called. This was my oversight I believe.

@ericstj
Copy link
Member

ericstj commented Jul 19, 2024

I marked this PR as breaking since it introduces new validation by default when in Development environment.

@ericstj
Copy link
Member

ericstj commented Jul 24, 2024

@steveharter or @wcsanders1 can you please create a breaking change doc for the new defaults for ServiceProviderOptions in development? That will cover the case that we didn't undo here. It can mention that developers can workaround it using UseDefaultServiceProvider if they don't wish to run validation.

Update - I went ahead and created it, please review what I've created. dotnet/docs#41887

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-Hosting breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants