Soenneker.Extensions.ServiceProvider 11.0.351

Prefix Reserved
dotnet add package Soenneker.Extensions.ServiceProvider --version 11.0.351
                    
NuGet\Install-Package Soenneker.Extensions.ServiceProvider -Version 11.0.351
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Extensions.ServiceProvider" Version="11.0.351" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.ServiceProvider" Version="11.0.351" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.ServiceProvider" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.ServiceProvider --version 11.0.351
                    
#r "nuget: Soenneker.Extensions.ServiceProvider, 11.0.351"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Extensions.ServiceProvider@11.0.351
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.ServiceProvider&version=11.0.351
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.ServiceProvider&version=11.0.351
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.ServiceProvider

Extension methods for resolving and validating services through IServiceProvider, with diagnostics suited to application and integration-test setup.

Installation

dotnet add package Soenneker.Extensions.ServiceProvider

Usage

using Soenneker.Extensions.ServiceProvider;

IMyService service = serviceProvider.Get<IMyService>();

Get<T>() returns the registered instance when it is assignable to T. A missing or incompatible registration throws InvalidOperationException with checks for service registration, test collections, fixtures, startup types, and factories. A null provider throws ArgumentNullException.

This is similar to GetRequiredService<T>(), but its error text is specifically useful in Soenneker integration tests.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net11.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Extensions.ServiceProvider:

Package Downloads
Soenneker.Tests.FixturedUnit

A fundamental xUnit test that stores UnitFixture and provides synthetic inversion of control

Soenneker.Tests.HostedUnit

A fundamental test that stores the TestHost and provides synthetic inversion of control

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.351 7,216 11/11/2026
11.0.350 2,606 11/10/2026
11.0.349 59 11/10/2026
4.0.348 61,081 10/25/2026
4.0.347 29,219 10/14/2026
4.0.346 8,485 10/14/2026
4.0.340 3,454 10/12/2026
4.0.339 8,826 10/12/2026
4.0.338 21,299 10/11/2026
4.0.337 60,698 9/24/2026
4.0.336 25,060 9/15/2026
4.0.335 35,880 9/12/2026
4.0.334 18,398 9/8/2026
4.0.333 99,407 8/29/2026
4.0.331 317 8/29/2026
4.0.330 67,098 8/12/2026
4.0.329 76,113 7/27/2026
4.0.328 66,934 7/16/2026
4.0.327 18,423 7/15/2026
4.0.326 69,933 6/18/2026
Loading failed

Upgrade .NET 11 release candidates to stable