Microsoft.Extensions.DependencyInjection 10.0.0-preview.5.25277.114

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
dis.taskmanager.contracts
Package Description
5,160
HotChocolate.Execution
Package Description
9,320
Microsoft.EntityFrameworkCore
Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
3,961
Microsoft.EntityFrameworkCore
Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
10,340
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
3,917
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
4,819
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
6,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
8,907
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
10,116
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
10,855
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
14,456
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
4,563
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
10,316
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
10,347
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
26,340
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging. When using NuGet 3.x this package requires at least version 3.4.
26,045
Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL
3,972
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Npgsql.EntityFrameworkCore.PostgreSQL.Design
3,970
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
11,068
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
14,220

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 6 11/18/2025
10.0.0-rc.2.25502.107 5 10/22/2025
10.0.0-rc.1.25451.107 7 09/30/2025
10.0.0-preview.7.25380.108 6 10/25/2025
10.0.0-preview.6.25358.103 6 09/30/2025
10.0.0-preview.5.25277.114 7 09/30/2025
10.0.0-preview.4.25258.110 8 05/25/2025
10.0.0-preview.3.25171.5 17 04/11/2025
10.0.0-preview.2.25163.2 18 03/21/2025
10.0.0-preview.1.25080.5 19 02/27/2025
9.0.11 6 11/19/2025
9.0.10 8 10/23/2025
9.0.9 9 09/23/2025
9.0.8 9 09/23/2025
9.0.7 9 09/23/2025
9.0.6 9 09/23/2025
9.0.5 9 05/24/2025
9.0.4 19 04/09/2025
9.0.3 17 03/13/2025
9.0.2 15 02/14/2025
9.0.1 18 01/17/2025
9.0.0 31 11/16/2024
9.0.0-rc.2.24473.5 26 10/14/2024
9.0.0-rc.1.24431.7 24 09/15/2024
9.0.0-preview.7.24405.7 19 08/14/2024
9.0.0-preview.6.24327.7 18 07/12/2024
9.0.0-preview.5.24306.7 23 06/12/2024
9.0.0-preview.4.24266.19 22 05/22/2024
9.0.0-preview.3.24172.9 23 04/17/2024
9.0.0-preview.2.24128.5 24 03/15/2024
9.0.0-preview.1.24080.9 26 02/19/2024
8.0.1 22 10/14/2024
8.0.0 41 11/16/2023
8.0.0-rc.2.23479.6 33 10/19/2023
8.0.0-rc.1.23419.4 37 09/23/2023
8.0.0-preview.7.23375.6 34 09/09/2023
8.0.0-preview.6.23329.7 37 09/08/2023
8.0.0-preview.5.23280.8 34 06/14/2023
8.0.0-preview.4.23259.5 37 05/19/2023
8.0.0-preview.3.23174.8 37 06/17/2023
8.0.0-preview.2.23128.3 35 04/02/2023
8.0.0-preview.1.23110.8 41 04/02/2023
7.0.0 4,568 11/15/2022
7.0.0-rc.2.22472.3 38 10/15/2022
7.0.0-rc.1.22426.10 39 09/24/2022
7.0.0-preview.7.22375.6 39 10/15/2022
7.0.0-preview.6.22324.4 43 09/27/2022
7.0.0-preview.5.22301.12 38 09/25/2022
7.0.0-preview.4.22229.4 47 09/23/2022
7.0.0-preview.3.22175.4 36 06/17/2023
7.0.0-preview.2.22152.2 39 06/27/2022
7.0.0-preview.1.22076.8 34 06/27/2022
6.0.2 24 11/16/2024
6.0.2-mauipre.1.22102.15 47 07/29/2022
6.0.2-mauipre.1.22054.8 37 06/27/2022
6.0.1 18,287 10/16/2022
6.0.0 21,626 06/27/2022
6.0.0-rc.2.21480.5 41 09/23/2022
6.0.0-rc.1.21451.13 32 06/17/2023
6.0.0-preview.7.21377.19 36 09/22/2022
6.0.0-preview.6.21352.12 37 06/27/2022
6.0.0-preview.5.21301.5 42 09/23/2022
6.0.0-preview.4.21253.7 34 06/27/2022
6.0.0-preview.3.21201.4 43 06/27/2022
6.0.0-preview.2.21154.6 27 09/21/2022
6.0.0-preview.1.21102.12 37 09/25/2022
5.0.2 12,183 06/27/2022
5.0.1 42 06/27/2022
5.0.0 26,045 06/27/2022
5.0.0-rc.2.20475.5 41 06/27/2022
5.0.0-rc.1.20451.14 44 06/27/2022
5.0.0-preview.8.20407.11 39 06/27/2022
5.0.0-preview.7.20364.11 42 06/29/2022
5.0.0-preview.6.20305.6 43 06/27/2022
5.0.0-preview.5.20278.1 36 06/27/2022
5.0.0-preview.4.20251.6 38 05/19/2023
5.0.0-preview.3.20215.2 42 07/05/2022
5.0.0-preview.2.20160.3 39 06/27/2022
5.0.0-preview.1.20120.4 36 09/25/2022
3.1.32 35 01/13/2023
3.1.31 38 01/13/2023
3.1.30 40 04/03/2023
3.1.29 40 09/22/2022
3.1.28 37 09/22/2022
3.1.27 35 09/21/2022
3.1.26 34 09/22/2022
3.1.25 36 09/27/2022
3.1.24 32 06/27/2022
3.1.23 30 06/27/2022
3.1.22 49 06/28/2022
3.1.21 39 09/21/2022
3.1.20 37 06/27/2022
3.1.19 28 09/22/2022
3.1.18 36 03/20/2023
3.1.17 37 06/28/2022
3.1.16 34 06/27/2022
3.1.15 43 07/03/2022
3.1.14 37 09/21/2022
3.1.13 35 06/27/2022
3.1.12 34 06/27/2022
3.1.11 36 06/27/2022
3.1.10 44 07/05/2022
3.1.9 31 02/26/2023
3.1.8 37 06/27/2022
3.1.7 41 09/22/2022
3.1.6 35 07/05/2022
3.1.5 10,345 06/27/2022
3.1.4 2,632 07/05/2022
3.1.3 10,326 06/27/2022
3.1.2 32 06/27/2022
3.1.1 32 09/21/2022
3.1.0 282 09/22/2022
3.1.0-preview3.19553.2 36 07/05/2022
3.1.0-preview2.19525.4 32 09/21/2022
3.1.0-preview1.19506.1 33 07/05/2022
3.0.3 32 06/27/2022
3.0.2 34 06/27/2022
3.0.1 39 07/26/2022
3.0.0 36 09/21/2022
3.0.0-rc1.19456.10 34 06/17/2023
3.0.0-preview9.19423.4 35 06/17/2023
3.0.0-preview8.19405.4 36 07/03/2022
3.0.0-preview7.19362.4 37 07/12/2022
3.0.0-preview6.19304.6 40 09/21/2022
3.0.0-preview5.19227.9 37 07/09/2022
3.0.0-preview4.19216.2 42 07/05/2022
3.0.0-preview3.19153.1 42 07/01/2022
3.0.0-preview.19074.2 36 06/17/2023
3.0.0-preview.18572.1 37 07/05/2022
2.2.0 1,045 09/27/2022
2.2.0-preview3-35497 36 07/25/2022
2.2.0-preview2-35157 35 07/27/2022
2.2.0-preview1-35029 40 06/30/2022
2.1.1 43 06/27/2022
2.1.0 38 06/27/2022
2.1.0-rc1-final 33 09/22/2022
2.1.0-preview2-final 35 07/05/2022
2.1.0-preview1-final 34 07/05/2022
2.0.0 1,432 06/27/2022
2.0.0-preview2-final 35 04/17/2023
2.0.0-preview1-final 37 09/21/2022
1.1.1 48 08/02/2022
1.1.0 3,956 06/27/2022
1.1.0-preview1-final 34 07/02/2022
1.0.2 32 06/30/2022
1.0.1 38 09/21/2022
1.0.0 33 09/27/2022
1.0.0-rc2-final 37 09/21/2022
1.0.0-rc1-final 38 07/05/2022