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

Remove GetKeyedService of specified type as .NET 10 implemented it as well #26

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

LoopedBard3
Copy link
Collaborator

@LoopedBard3 LoopedBard3 commented Nov 21, 2024

Remove GetKeyedService of specified type as .NET 10 seems to have implemented the same method signature.
The warning that was being hit was:

DotNet_OrchardCore\orchardcore\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScopeServices.cs(17,21): error CS0121: The call is ambiguous between the following methods or properties: 'Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetKeyedService(System.IServiceProvider, System.Type, object?)' and 'OrchardCore.Environment.Shell.Builders.ServiceProviderExtensions.GetKeyedService(System.IServiceProvider, System.Type, object?)' [D:\a\_work\1\s\artifacts\out\DotNet_OrchardCore\orchardcore\src\OrchardCore\OrchardCore.Abstractions\OrchardCore.Abstractions.csproj::TargetFramework=net10.0]

@LoopedBard3 LoopedBard3 self-assigned this Nov 21, 2024
@@ -21,18 +21,4 @@ public static TResult CreateInstance<TResult>(this IServiceProvider provider, Ty
{
return (TResult)ActivatorUtilities.CreateInstance(provider, type);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we sure that the new net10 method works the same way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@LoopedBard3 LoopedBard3 merged commit 1c204b2 into dotnet-perf-bot:main Nov 21, 2024
12 of 20 checks passed
@LoopedBard3 LoopedBard3 deleted the FixNet10Builds branch November 21, 2024 23:05
LoopedBard3 added a commit that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants