net10.0
namespace Microsoft.Extensions.DependencyInjection
{
    public static class ServiceProviderServiceExtensions
    {
        public static T GetRequiredService<T>(this IServiceProvider! provider)
            where T, notnull;
    }
}
nuget.org
5.7 %
Reference this API
.NET
5.06.07.08.09.010.0
.NET Core
3.03.1
.NET Framework
4.6.24.74.7.14.7.24.84.8.1
Information specific to net10.0
Assembly

Microsoft.Extensions.DependencyInjection.Abstractions , Version=10.0.0.0, PublicKeyToken=adb9793829ddae60

Referencing

Requires any:

  • Your project needs to use SDK Microsoft.NET.Sdk.Web.

  • Your project needs a framework reference to Microsoft.AspNetCore.App.

  • Your project needs a package reference to Microsoft.Extensions.DependencyInjection.Abstractions.

Platform Restrictions

This API is supported on all platforms.

  • Built-in API
  • Package-provided API