-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
dotnet/dotnet-api-docs
#11866Labels
🏁 Release: .NET 8Work items for the .NET 8 releaseWork items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.🗺️ mapQUESTOnly used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change
Description
Description
FromServiceKeyAttribute
has been extended to support null (for unkeyed) and inheritance.
Version
.NET 8
Previous behavior
FromServiceKeyAttribute.Key
was a non-nullable object object
.
New behavior
FromServiceKeyAttribute.Key
is a nullable object object?
.
Type of breaking change
- Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
- Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
- Behavioral change: Existing binaries might behave differently at run time.
Reason for change
See dotnet/runtime#113585. Support was added for keyed services to annotate parameters as unkeyed.
Recommended action
Adjust any caller that is using FromServiceKeyAttribute
to accept a null
value for Key
.
Feature area
Extensions
Affected APIs
Microsoft.Extensions.DependencyInjection.FromServiceKeyAttribute.Key
Copilot
Metadata
Metadata
Labels
🏁 Release: .NET 8Work items for the .NET 8 releaseWork items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.🗺️ mapQUESTOnly used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.breaking-changeIndicates a .NET Core breaking changeIndicates a .NET Core breaking change