Microsoft.Extensions.DependencyInjection 10.0.0-preview.1.25080.5

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
DevExpress.Xpo
eXpress Persistent Objects (XPO) is an Object-Relational Mapping (ORM) tool that handles all aspects of database creation and object persistence, allowing you to concentrate on your application's business logic. XPO supports more than a dozen database management systems and implements a common high-level API. Whether using MS SQL Server, PostgreSQL, MySQL, Oracle, or others, you will use the same code to implement data access and management operations. Should you decide to move your storage to a different database system, you’ll only need to change the connection string. For more information, see https://DevExpress.com/XPO.
25
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
24
Microsoft.AspNetCore.Mvc
ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup.
24
DevExpress.Xpo
eXpress Persistent Objects (XPO) is an Object-Relational Mapping (ORM) tool that handles all aspects of database creation and object persistence, allowing you to concentrate on your application's business logic. XPO supports more than a dozen database management systems and implements a common high-level API. Whether using MS SQL Server, PostgreSQL, MySQL, Oracle, or others, you will use the same code to implement data access and management operations. Should you decide to move your storage to a different database system, you’ll only need to change the connection string. For more information, see https://DevExpress.com/XPO.
21
Volo.Abp.TextTemplating.Razor
Package Description
21
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
21
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
20
Microsoft.AspNetCore.Mvc.Localization
ASP.NET Core MVC features that enable globalization and localization of applications. Commonly used types: Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<TResource> Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer
20
Volo.Abp.Core
Package Description
18
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
17
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
17
Volo.Abp.TextTemplating.Razor
Package Description
17
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
14
Volo.Abp.TextTemplating.Razor
Package Description
11
Volo.Abp.Core
Package Description
10
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
9
Volo.Abp.Core
Package Description
9
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging. When using NuGet 3.x this package requires at least version 3.4.
8
Microsoft.AspNetCore.Mvc
ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup.
8
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
8

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

.NET 10.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
10.0.0-preview.1.25080.5 1 02/26/2025
9.0.9 2 09/19/2025
9.0.8 2 09/19/2025
9.0.7 3 08/01/2025
9.0.6 3 08/01/2025
9.0.5 4 06/04/2025
9.0.4 4 06/04/2025
9.0.3 5 03/12/2025
9.0.2 5 03/12/2025
9.0.1 5 03/12/2025
9.0.0 5 03/12/2025
9.0.0-rc.2.24473.5 2 06/04/2025
9.0.0-rc.1.24431.7 7 11/12/2024
8.0.1 5 03/12/2025
8.0.0 10 09/18/2024
8.0.0-rc.1.23419.4 2 06/04/2025
7.0.0 20 10/14/2024
7.0.0-rc.2.22472.3 2 06/05/2025
7.0.0-rc.1.22426.10 4 02/22/2025
6.0.2 5 03/12/2025
6.0.1 5 03/12/2025
6.0.0 18 09/25/2024
6.0.0-rc.2.21480.5 1 06/05/2025
6.0.0-rc.1.21451.13 2 03/12/2025
6.0.0-preview.7.21377.19 1 03/12/2025
5.0.2 6 03/12/2025
5.0.1 6 10/01/2024
5.0.0 5 03/12/2025
5.0.0-rc.2.20475.5 2 06/05/2025
5.0.0-rc.1.20451.14 3 02/22/2025
5.0.0-preview.7.20364.11 1 03/12/2025
3.1.32 3 02/20/2025
3.1.31 3 02/20/2025
3.1.30 2 02/20/2025
3.1.29 2 02/20/2025
3.1.28 3 02/20/2025
3.1.27 2 02/20/2025
3.1.26 2 02/20/2025
3.1.25 3 02/20/2025
3.1.24 2 02/20/2025
3.1.23 2 02/20/2025
3.1.22 3 02/20/2025
3.1.21 2 02/20/2025
3.1.20 2 02/20/2025
3.1.19 2 02/20/2025
3.1.18 2 02/20/2025
3.1.17 2 02/20/2025
3.1.16 2 02/20/2025
3.1.15 2 02/20/2025
3.1.14 3 02/20/2025
3.1.13 2 02/20/2025
3.1.12 2 02/20/2025
3.1.11 2 02/20/2025
3.1.10 2 02/20/2025
3.1.9 5 03/12/2025
3.1.8 5 03/12/2025
3.1.7 5 03/12/2025
3.1.6 5 03/12/2025
3.1.5 5 03/12/2025
3.1.4 5 03/12/2025
3.1.3 5 03/12/2025
3.1.2 5 03/12/2025
3.1.1 5 03/12/2025
3.1.0 5 03/12/2025
3.0.3 5 03/12/2025
3.0.2 5 03/12/2025
3.0.1 5 03/12/2025
3.0.0 5 03/12/2025
3.0.0-rc1.19456.10 1 03/12/2025
2.2.0 5 03/12/2025
2.1.1 5 03/12/2025
2.1.0 5 03/12/2025
2.1.0-rc1-final 3 02/20/2025
2.1.0-preview2-final 2 02/20/2025
2.1.0-preview1-final 2 02/20/2025
2.0.0 49 09/15/2024
2.0.0-preview2-final 2 02/20/2025
2.0.0-preview1-final 2 02/20/2025
1.1.1 5 03/12/2025
1.1.0 5 03/12/2025
1.1.0-preview1-final 2 02/20/2025
1.0.2 5 03/12/2025
1.0.1 5 03/12/2025
1.0.0 6 03/12/2025
1.0.0-rc2-final 3 02/20/2025
1.0.0-rc1-final 2 02/20/2025