<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />

Microsoft.Extensions.DependencyInjection.ServiceProviderOptions

public class ServiceProviderOptions
Options for configuring various behaviors of the default IServiceProvider implementation.
public bool ValidateOnBuild { get; set; }

Gets or sets a value that indicates whether validation is performed to ensure all services can be created when BuildServiceProvider is called.

public bool ValidateScopes { get; set; }

Gets or sets a value that indicates whether validation is performed to ensure that scoped services are never resolved from the root provider.