Microsoft.Extensions.DependencyInjection 10.0.0-preview.4.25258.110

About

Supports the dependency injection (DI) software design pattern which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies.

Key Features

Provides an implementation of the DI interfaces found in the Microsoft.Extensions.DependencyInjection.Abstractions package.

How to Use

ServiceCollection services = new ();
services.AddSingleton<IMessageWriter, MessageWriter>();
using ServiceProvider provider = services.BuildServiceProvider();

// The code below, following the IoC pattern, is typically only aware of the IMessageWriter interface, not the implementation.
IMessageWriter messageWriter = provider.GetService<IMessageWriter>()!;
messageWriter.Write("Hello");

public interface IMessageWriter
{
    void Write(string message);
}

internal class MessageWriter : IMessageWriter
{
    public void Write(string message)
    {
        Console.WriteLine($"MessageWriter.Write(message: \"{message}\")");
    }
}

Main Types

The main types provided by this library are:

  • Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory
  • Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions
  • Microsoft.Extensions.DependencyInjection.ServiceProvider

Additional Documentation

  • Microsoft.Extensions.DependencyInjection.Abstractions
  • Microsoft.Extensions.Hosting
  • Microsoft.Extensions.Options

Feedback & Contributing

Microsoft.Extensions.DependencyInjection is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on Microsoft.Extensions.DependencyInjection.

Packages Downloads
HotChocolate.Execution
Package Description
4,584
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
4,147
HotChocolate.Execution
Package Description
4,129
HotChocolate.Utilities.DependencyInjection
Contains internal helper classes for Microsoft's dependency injection used by the Hot Chocolate GraphQL type system and the GraphQL query execution engine.
4,129
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
3,909
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
1,628
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
1,621
Cocona
Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.
1,620
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
1,591
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
1,033
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
515
Microsoft.EntityFrameworkCore
Entity Framework Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MySQL, PostgreSQL, and other databases through a provider plugin API. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
510
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
506
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
504
Microsoft.EntityFrameworkCore
Entity Framework Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MySQL, PostgreSQL, and other databases through a provider plugin API. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
502
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
502
HotChocolate.Execution
Package Description
492
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
293
Microsoft.EntityFrameworkCore
Entity Framework Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MySQL, PostgreSQL, and other databases through a provider plugin API. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
214
Microsoft.EntityFrameworkCore
Entity Framework Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MySQL, PostgreSQL, and other databases through a provider plugin API. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
180

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET Standard 2.1

.NET Standard 2.0

.NET 10.0

.NET 8.0

.NET 9.0

Version Downloads Last updated
10.0.0-preview.5.25277.114 6 06/09/2025
10.0.0-preview.4.25258.110 12 05/15/2025
10.0.0-preview.3.25171.5 15 04/12/2025
10.0.0-preview.2.25163.2 16 03/23/2025
10.0.0-preview.1.25080.5 19 02/26/2025
9.0.6 8 06/14/2025
9.0.5 10 05/16/2025
9.0.4 16 04/13/2025
9.0.3 15 03/15/2025
9.0.2 18 02/16/2025
9.0.1 22 01/19/2025
9.0.0 1,032 11/13/2024
9.0.0-rc.2.24473.5 25 10/17/2024
9.0.0-rc.1.24431.7 26 09/12/2024
9.0.0-preview.7.24405.7 30 08/15/2024
9.0.0-preview.6.24327.7 39 07/11/2024
9.0.0-preview.5.24306.7 35 06/14/2024
9.0.0-preview.4.24266.19 31 06/05/2024
9.0.0-preview.3.24172.9 35 04/13/2024
9.0.0-preview.2.24128.5 42 03/19/2024
9.0.0-preview.1.24080.9 40 02/16/2024
8.0.1 26 10/09/2024
8.0.0 4,153 11/17/2023
8.0.0-rc.2.23479.6 44 10/23/2023
8.0.0-rc.1.23419.4 51 09/14/2023
8.0.0-preview.7.23375.6 41 08/17/2023
8.0.0-preview.6.23329.7 37 07/21/2023
8.0.0-preview.5.23280.8 32 07/16/2023
8.0.0-preview.4.23259.5 49 05/29/2023
8.0.0-preview.3.23174.8 43 04/29/2023
8.0.0-preview.2.23128.3 500 07/04/2023
8.0.0-preview.1.23110.8 53 02/26/2023
7.0.0 511 11/15/2022
7.0.0-rc.2.22472.3 43 07/09/2023
7.0.0-rc.1.22426.10 52 11/30/2022
7.0.0-preview.7.22375.6 56 08/10/2022
7.0.0-preview.6.22324.4 64 05/19/2023
7.0.0-preview.5.22301.12 55 05/03/2023
7.0.0-preview.4.22229.4 43 07/03/2023
7.0.0-preview.3.22175.4 45 09/29/2022
7.0.0-preview.2.22152.2 49 09/28/2022
7.0.0-preview.1.22076.8 50 03/25/2023
6.0.2 25 11/13/2024
6.0.2-mauipre.1.22102.15 44 07/09/2022
6.0.2-mauipre.1.22054.8 48 03/26/2023
6.0.1 50 01/24/2023
6.0.0 1,633 11/09/2021
6.0.0-rc.2.21480.5 48 07/09/2023
6.0.0-rc.1.21451.13 45 05/04/2023
6.0.0-preview.7.21377.19 39 07/03/2023
6.0.0-preview.6.21352.12 44 07/11/2023
6.0.0-preview.5.21301.5 37 05/10/2023
6.0.0-preview.4.21253.7 56 11/22/2022
6.0.0-preview.3.21201.4 50 07/10/2023
6.0.0-preview.2.21154.6 40 07/12/2023
6.0.0-preview.1.21102.12 55 07/09/2023
5.0.2 59 07/19/2021
5.0.1 195 01/27/2021
5.0.0 199 01/26/2021
5.0.0-rc.2.20475.5 43 07/09/2023
5.0.0-rc.1.20451.14 49 07/08/2023
5.0.0-preview.8.20407.11 52 10/14/2022
5.0.0-preview.7.20364.11 40 07/01/2023
5.0.0-preview.6.20305.6 58 04/19/2023
5.0.0-preview.5.20278.1 54 05/05/2023
5.0.0-preview.4.20251.6 53 05/23/2023
5.0.0-preview.3.20215.2 57 07/03/2022
5.0.0-preview.2.20160.3 42 07/08/2023
5.0.0-preview.1.20120.4 45 05/18/2023
3.1.32 44 05/16/2023
3.1.31 37 04/07/2023
3.1.30 46 03/21/2023
3.1.29 37 01/21/2023
3.1.28 45 12/19/2022
3.1.27 42 09/22/2022
3.1.26 46 07/22/2022
3.1.25 40 05/12/2023
3.1.24 40 04/01/2023
3.1.23 41 07/05/2023
3.1.22 41 07/05/2023
3.1.21 40 11/05/2022
3.1.20 46 05/19/2023
3.1.19 49 06/20/2022
3.1.18 46 09/05/2022
3.1.17 48 03/17/2023
3.1.16 38 05/04/2023
3.1.15 35 04/04/2023
3.1.14 42 02/26/2023
3.1.13 39 11/05/2022
3.1.12 45 09/18/2022
3.1.11 46 02/02/2023
3.1.10 45 03/10/2023
3.1.9 44 12/18/2022
3.1.8 39 04/01/2023
3.1.7 48 11/10/2020
3.1.6 39 04/02/2023
3.1.5 63 10/04/2022
3.1.4 4,601 07/19/2021
3.1.3 46 03/29/2023
3.1.2 52 06/11/2022
3.1.1 44 07/25/2022
3.1.0 522 02/02/2021
3.1.0-preview3.19553.2 51 06/07/2022
3.1.0-preview2.19525.4 43 12/03/2022
3.1.0-preview1.19506.1 55 10/30/2022
3.0.3 46 09/28/2022
3.0.2 38 02/12/2023
3.0.1 43 12/29/2022
3.0.0 48 04/17/2023
3.0.0-rc1.19456.10 57 07/07/2023
3.0.0-preview9.19423.4 55 07/10/2023
3.0.0-preview8.19405.4 59 10/06/2022
3.0.0-preview7.19362.4 43 04/10/2023
3.0.0-preview6.19304.6 50 03/16/2023
3.0.0-preview5.19227.9 37 07/10/2023
3.0.0-preview4.19216.2 50 03/02/2023
3.0.0-preview3.19153.1 46 07/09/2023
3.0.0-preview.19074.2 41 07/17/2022
3.0.0-preview.18572.1 42 11/04/2022
2.2.0 44 07/12/2022
2.2.0-preview3-35497 53 09/04/2022
2.2.0-preview2-35157 49 05/24/2023
2.2.0-preview1-35029 48 02/01/2023
2.1.1 88 11/09/2020
2.1.0 78 11/01/2020
2.1.0-rc1-final 58 07/11/2023
2.1.0-preview2-final 63 11/19/2022
2.1.0-preview1-final 53 04/29/2023
2.0.0 48 06/07/2022
2.0.0-preview2-final 46 05/04/2023
2.0.0-preview1-final 44 07/01/2023
1.1.1 47 12/29/2022
1.1.0 38 03/02/2023
1.1.0-preview1-final 42 03/17/2023
1.0.2 42 03/18/2023
1.0.1 43 10/02/2022
1.0.0 46 09/01/2022
1.0.0-rc2-final 43 09/07/2022
1.0.0-rc1-final 51 03/19/2023