Microsoft.Extensions.DependencyInjection 10.0.0-rc.1.25451.107

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
5,377
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
4,952
HotChocolate.Execution
Package Description
4,914
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,913
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
4,705
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
2,280
Cocona
Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.
2,275
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
2,272
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
2,243
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
1,687
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
821
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
591
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
519
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
515
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
515
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
511
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
508
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
506
HotChocolate.Execution
Package Description
494
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
298

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-rc.1.25451.107 2 09/11/2025
10.0.0-preview.7.25380.108 5 08/15/2025
10.0.0-preview.6.25358.103 8 07/16/2025
10.0.0-preview.5.25277.114 15 06/09/2025
10.0.0-preview.4.25258.110 19 05/15/2025
10.0.0-preview.3.25171.5 21 04/12/2025
10.0.0-preview.2.25163.2 21 03/23/2025
10.0.0-preview.1.25080.5 25 02/26/2025
9.0.9 2 09/11/2025
9.0.8 44 08/07/2025
9.0.7 588 07/10/2025
9.0.6 819 06/14/2025
9.0.5 17 05/16/2025
9.0.4 19 04/13/2025
9.0.3 24 03/15/2025
9.0.2 23 02/16/2025
9.0.1 27 01/19/2025
9.0.0 1,686 11/13/2024
9.0.0-rc.2.24473.5 32 10/17/2024
9.0.0-rc.1.24431.7 33 09/12/2024
9.0.0-preview.7.24405.7 38 08/15/2024
9.0.0-preview.6.24327.7 47 07/11/2024
9.0.0-preview.5.24306.7 42 06/14/2024
9.0.0-preview.4.24266.19 37 06/05/2024
9.0.0-preview.3.24172.9 43 04/13/2024
9.0.0-preview.2.24128.5 49 03/19/2024
9.0.0-preview.1.24080.9 48 02/16/2024
8.0.1 31 10/09/2024
8.0.0 4,958 11/17/2023
8.0.0-rc.2.23479.6 52 10/23/2023
8.0.0-rc.1.23419.4 60 09/14/2023
8.0.0-preview.7.23375.6 47 08/17/2023
8.0.0-preview.6.23329.7 47 07/21/2023
8.0.0-preview.5.23280.8 42 07/16/2023
8.0.0-preview.4.23259.5 57 05/29/2023
8.0.0-preview.3.23174.8 50 04/29/2023
8.0.0-preview.2.23128.3 506 07/04/2023
8.0.0-preview.1.23110.8 59 02/26/2023
7.0.0 519 11/15/2022
7.0.0-rc.2.22472.3 52 07/09/2023
7.0.0-rc.1.22426.10 57 11/30/2022
7.0.0-preview.7.22375.6 65 08/10/2022
7.0.0-preview.6.22324.4 72 05/19/2023
7.0.0-preview.5.22301.12 60 05/03/2023
7.0.0-preview.4.22229.4 49 07/03/2023
7.0.0-preview.3.22175.4 54 09/29/2022
7.0.0-preview.2.22152.2 58 09/28/2022
7.0.0-preview.1.22076.8 57 03/25/2023
6.0.2 32 11/13/2024
6.0.2-mauipre.1.22102.15 50 07/09/2022
6.0.2-mauipre.1.22054.8 54 03/26/2023
6.0.1 57 01/24/2023
6.0.0 2,283 11/09/2021
6.0.0-rc.2.21480.5 52 07/09/2023
6.0.0-rc.1.21451.13 52 05/04/2023
6.0.0-preview.7.21377.19 46 07/03/2023
6.0.0-preview.6.21352.12 51 07/11/2023
6.0.0-preview.5.21301.5 44 05/10/2023
6.0.0-preview.4.21253.7 64 11/22/2022
6.0.0-preview.3.21201.4 56 07/10/2023
6.0.0-preview.2.21154.6 47 07/12/2023
6.0.0-preview.1.21102.12 62 07/09/2023
5.0.2 65 07/19/2021
5.0.1 204 01/27/2021
5.0.0 207 01/26/2021
5.0.0-rc.2.20475.5 51 07/09/2023
5.0.0-rc.1.20451.14 60 07/08/2023
5.0.0-preview.8.20407.11 60 10/14/2022
5.0.0-preview.7.20364.11 49 07/01/2023
5.0.0-preview.6.20305.6 64 04/19/2023
5.0.0-preview.5.20278.1 60 05/05/2023
5.0.0-preview.4.20251.6 58 05/23/2023
5.0.0-preview.3.20215.2 62 07/03/2022
5.0.0-preview.2.20160.3 49 07/08/2023
5.0.0-preview.1.20120.4 51 05/18/2023
3.1.32 53 05/16/2023
3.1.31 43 04/07/2023
3.1.30 57 03/21/2023
3.1.29 44 01/21/2023
3.1.28 50 12/19/2022
3.1.27 50 09/22/2022
3.1.26 53 07/22/2022
3.1.25 47 05/12/2023
3.1.24 46 04/01/2023
3.1.23 47 07/05/2023
3.1.22 49 07/05/2023
3.1.21 46 11/05/2022
3.1.20 56 05/19/2023
3.1.19 55 06/20/2022
3.1.18 54 09/05/2022
3.1.17 57 03/17/2023
3.1.16 45 05/04/2023
3.1.15 41 04/04/2023
3.1.14 48 02/26/2023
3.1.13 46 11/05/2022
3.1.12 56 09/18/2022
3.1.11 51 02/02/2023
3.1.10 53 03/10/2023
3.1.9 52 12/18/2022
3.1.8 44 04/01/2023
3.1.7 55 11/10/2020
3.1.6 48 04/02/2023
3.1.5 69 10/04/2022
3.1.4 5,397 07/19/2021
3.1.3 52 03/29/2023
3.1.2 59 06/11/2022
3.1.1 54 07/25/2022
3.1.0 531 02/02/2021
3.1.0-preview3.19553.2 59 06/07/2022
3.1.0-preview2.19525.4 50 12/03/2022
3.1.0-preview1.19506.1 62 10/30/2022
3.0.3 55 09/28/2022
3.0.2 44 02/12/2023
3.0.1 51 12/29/2022
3.0.0 56 04/17/2023
3.0.0-rc1.19456.10 65 07/07/2023
3.0.0-preview9.19423.4 63 07/10/2023
3.0.0-preview8.19405.4 66 10/06/2022
3.0.0-preview7.19362.4 52 04/10/2023
3.0.0-preview6.19304.6 60 03/16/2023
3.0.0-preview5.19227.9 46 07/10/2023
3.0.0-preview4.19216.2 58 03/02/2023
3.0.0-preview3.19153.1 54 07/09/2023
3.0.0-preview.19074.2 48 07/17/2022
3.0.0-preview.18572.1 47 11/04/2022
2.2.0 52 07/12/2022
2.2.0-preview3-35497 60 09/04/2022
2.2.0-preview2-35157 56 05/24/2023
2.2.0-preview1-35029 53 02/01/2023
2.1.1 97 11/09/2020
2.1.0 86 11/01/2020
2.1.0-rc1-final 63 07/11/2023
2.1.0-preview2-final 69 11/19/2022
2.1.0-preview1-final 59 04/29/2023
2.0.0 55 06/07/2022
2.0.0-preview2-final 56 05/04/2023
2.0.0-preview1-final 49 07/01/2023
1.1.1 54 12/29/2022
1.1.0 47 03/02/2023
1.1.0-preview1-final 46 03/17/2023
1.0.2 51 03/18/2023
1.0.1 50 10/02/2022
1.0.0 52 09/01/2022
1.0.0-rc2-final 50 09/07/2022
1.0.0-rc1-final 59 03/19/2023