Skip to content

Conversation

@steveharter
Copy link
Contributor

@steveharter steveharter commented Aug 22, 2024

Backport of #105776 to release/8.0-staging

Customer Impact

  • Customer reported
  • Found internally

See issue #95789 and duplicate issue #99622. In 8.0, when supported for keyed services was added, 3 existing properties were changed to throw InvalidOperationException in cases where they were not expected to be called. However, this caused some backwards compatibility issues for various scenarios including tooling.

Regression

  • Yes
  • No

The 3 affected properties before the keyed services feature was added in 8.0 did not throw; once the keyed services feature was added they can throw, by design, in cases where they were not expected to be called.

Testing

The tests verify the expected behavior of returning null instead of throwing; existing tests were modified in 9.0 for the new behavior.

Risk

Low, this changes 3 properties that were changed in 8.0 to throw an InvalidOperationException in unexpected cases; with this PR they return null instead.

@steveharter steveharter self-assigned this Aug 22, 2024
@steveharter steveharter added this to the 8.0.x milestone Aug 22, 2024
@dotnet-policy-service
Copy link
Contributor

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

@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.10 Aug 29, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 29, 2024
@ericstj ericstj merged commit 351060e into dotnet:release/8.0-staging Sep 4, 2024
@steveharter steveharter deleted the backport-pr-105776-to-8.0-staging branch September 4, 2024 16:20
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2024
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.

5 participants