Describe the bug
When retargeting OrchardCMS app to .NET 10, it is built failed with CS0212 error
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?)'
After investigation , OrchardCore needs to remove their extension method for .NET 10 .
please refer to dotnet/aspnetcore#60307 to get details
Orchard Core version
To Reproduce
- replace net8.0 to net10.0 in src\OrchardCore.Build\Dependencies.AspNetCore.props file.
- dotnet publish src\OrchardCore.Cms.Web -f net10.0
Expected behavior
publish successfully
Logs and screenshots
