Microsoft.Extensions.DependencyInjection 11.0.0-preview.2.26159.112

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
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies. This package was built from the source code at https://github.com/aspnet/scaffolding/tree/458fd60d0885d8e7933b40d1386bf21f1a0f2590
21
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
19
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/b7a2ec8c7ed6b48857af0a69688a73e8c14fe6cb
19
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
19
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
18
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/e81033e094d4663ffd227bb4aed30b76b0631e6d
18
FreeSql.DbContext
FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, And Access
18
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
17
learun.utils
力软敏捷框架util通用方法
17
Magicodes.IE.Core
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html. 导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。 开源库地址:https://github.com/xin-lai 博客地址:http://www.cnblogs.com/codelove/ 公众号:麦扣聊技术 交流QQ群:85318032 **2021.07.15** - Magicodes.EPPlus回退到4.6.3,以修复格式错乱的问题 - 修复Excel仅导出错误数据时的Bug[#302](https://github.com/dotnetcore/Magicodes.IE/pull/302) - 完善多语言[#298](https://github.com/dotnetcore/Magicodes.IE/pull/298),以及完善单元测试 **2021.07.04** - 模板导出支持一行多个表格[#296](https://github.com/dotnetcore/Magicodes.IE/issues/296) **2021.06.29** - 合并PR[#295](https://github.com/dotnetcore/Magicodes.IE/pull/295),完善模板导出类型定义的问题 **2021.06.25** - Fix only first [ColumnIndex] is valid exception[#289](https://github.com/dotnetcore/Magicodes.IE/issues/289) **2021.06.18** - Update ImportTestColumnIndex_Test - Magicodes.EPPlus was upgraded to 4.6.7[#285](https://github.com/dotnetcore/Magicodes.IE/issues/285) **2021.06.05** - Fix ImporterHeader->ColumnIndex - Utilize RecyclableMemoryStream instead of "new MemoryStream" all over **2021.06.05** - EXCEL模板导出支持XOffset和YOffset - EXCEL修复ValueMapping - Core工程多语言配置 - EXCEL优化时间导出 **2021.06.01** - EXCEL支持自动换行属性 - EXCEL支持隐藏列属性 - EXCEL优化时间优化
17
AspectCore.Extensions.DependencyInjection
Interceptor and dynamicProxy support for Microsoft.Extensions.DependencyInjection via AspectCore Framework.
17
Microsoft.AspNetCore.DataProtection.Extensions
Additional APIs for ASP.NET Core data protection. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d9ba962869d1b1c410ea476b02de2f8e27eec762
17
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies. This package was built from the source code at https://github.com/aspnet/scaffolding/tree/629bb9963377eb9e915013bd8b2f5c724833d82a
17
Microsoft.VisualStudio.Web.CodeGeneration
Contains the CodeGenCommand that finds the appropriate code generator and invokes it from project dependencies.
17
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/c04846dc66cc97f71d83a83a15437828435f5d44
16
Volo.Abp.Core
Package Description
16
Microsoft.AspNetCore.Components.Web
Support for rendering ASP.NET Core components for browsers. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/3f1acb59718cadf111a0a796681e3d3509bb3381
16
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
16

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

.NET Framework 4.6.2

.NET 10.0

.NET 11.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
11.0.0-preview.2.26159.112 2 2026/3/13
11.0.0-preview.1.26104.118 1 2026/2/18
10.0.5 1 2026/3/16
10.0.4 1 2026/3/14
10.0.3 2 2026/2/14
10.0.2 3 2026/1/16
10.0.1 4 2025/12/11
10.0.0 7 2025/11/12
10.0.0-rc.2.25502.107 6 2025/10/30
10.0.0-rc.1.25451.107 6 2025/9/23
10.0.0-preview.7.25380.108 6 2025/9/23
10.0.0-preview.6.25358.103 5 2025/9/23
10.0.0-preview.5.25277.114 2 2025/6/11
10.0.0-preview.4.25258.110 3 2025/5/24
10.0.0-preview.3.25171.5 1 2025/5/27
10.0.0-preview.2.25163.2 1 2025/5/27
10.0.0-preview.1.25080.5 7 2025/5/27
9.0.14 2 2026/3/13
9.0.13 2 2026/2/14
9.0.12 4 2026/1/16
9.0.11 6 2025/11/12
9.0.10 3 2025/10/31
9.0.9 8 2025/9/23
9.0.8 5 2025/9/23
9.0.7 6 2025/9/23
9.0.6 6 2025/10/7
9.0.5 2 2025/5/24
9.0.4 2 2025/5/27
9.0.3 2 2025/5/27
9.0.2 1 2025/5/27
9.0.1 1 2025/5/27
9.0.0 5 2025/10/6
9.0.0-rc.2.24473.5 1 2025/5/27
9.0.0-rc.1.24431.7 2 2025/5/27
9.0.0-preview.7.24405.7 9 2025/5/27
9.0.0-preview.6.24327.7 1 2025/5/27
9.0.0-preview.5.24306.7 1 2025/5/28
9.0.0-preview.4.24266.19 1 2025/5/27
9.0.0-preview.3.24172.9 1 2025/5/28
9.0.0-preview.2.24128.5 1 2025/5/27
9.0.0-preview.1.24080.9 1 2025/5/28
8.0.1 1 2025/5/27
8.0.0 1 2025/5/27
8.0.0-rc.2.23479.6 1 2025/5/27
8.0.0-rc.1.23419.4 8 2025/5/27
8.0.0-preview.7.23375.6 6 2025/5/27
8.0.0-preview.6.23329.7 7 2025/5/27
8.0.0-preview.5.23280.8 6 2025/5/27
8.0.0-preview.4.23259.5 8 2025/5/27
8.0.0-preview.3.23174.8 6 2025/5/28
8.0.0-preview.2.23128.3 7 2025/5/27
8.0.0-preview.1.23110.8 9 2025/5/27
7.0.0 7 2025/5/27
7.0.0-rc.2.22472.3 7 2025/5/27
7.0.0-rc.1.22426.10 6 2025/5/27
7.0.0-preview.7.22375.6 7 2025/5/27
7.0.0-preview.6.22324.4 11 2025/5/27
7.0.0-preview.5.22301.12 6 2025/5/27
7.0.0-preview.4.22229.4 5 2025/5/28
7.0.0-preview.3.22175.4 5 2025/5/28
7.0.0-preview.2.22152.2 6 2025/5/27
7.0.0-preview.1.22076.8 6 2025/5/27
6.0.2 6 2025/5/27
6.0.1 7 2025/5/27
6.0.0 7 2025/5/27
6.0.0-rc.2.21480.5 6 2025/5/27
6.0.0-rc.1.21451.13 7 2025/5/27
6.0.0-preview.7.21377.19 7 2025/5/27
6.0.0-preview.6.21352.12 8 2025/5/27
6.0.0-preview.5.21301.5 7 2025/5/27
6.0.0-preview.4.21253.7 6 2025/5/27
6.0.0-preview.3.21201.4 7 2025/5/27
6.0.0-preview.2.21154.6 6 2025/5/27
6.0.0-preview.1.21102.12 5 2025/5/27
5.0.2 7 2025/5/27
5.0.1 7 2025/5/27
5.0.0 7 2025/5/27
5.0.0-rc.2.20475.5 7 2025/5/27
5.0.0-rc.1.20451.14 5 2025/5/27
5.0.0-preview.8.20407.11 5 2025/5/27
5.0.0-preview.7.20364.11 6 2025/5/28
5.0.0-preview.6.20305.6 5 2025/5/27
5.0.0-preview.5.20278.1 7 2025/5/27
5.0.0-preview.4.20251.6 8 2025/5/28
5.0.0-preview.3.20215.2 9 2025/5/27
5.0.0-preview.2.20160.3 6 2025/5/27
5.0.0-preview.1.20120.4 5 2025/5/28
3.1.32 9 2025/5/27
3.1.31 9 2025/5/27
3.1.30 8 2025/5/27
3.1.29 15 2025/5/27
3.1.28 6 2025/5/27
3.1.27 7 2025/5/27
3.1.26 7 2025/5/27
3.1.25 10 2025/5/27
3.1.24 8 2025/5/27
3.1.23 8 2025/5/27
3.1.22 7 2025/5/27
3.1.21 8 2025/5/27
3.1.20 6 2025/5/27
3.1.19 7 2025/5/28
3.1.18 7 2025/5/28
3.1.17 9 2025/5/27
3.1.16 10 2025/5/27
3.1.15 7 2025/5/27
3.1.14 7 2025/5/27
3.1.13 6 2025/5/27
3.1.12 8 2025/5/27
3.1.11 8 2025/5/27
3.1.10 8 2025/5/27
3.1.9 8 2025/5/27
3.1.8 8 2025/5/27
3.1.7 8 2025/5/27
3.1.6 8 2025/5/27
3.1.5 8 2025/5/27
3.1.4 6 2025/5/27
3.1.3 8 2025/5/27
3.1.2 6 2025/5/27
3.1.1 6 2025/5/27
3.1.0 6 2025/5/28
3.1.0-preview3.19553.2 6 2025/5/27
3.1.0-preview2.19525.4 7 2025/5/27
3.1.0-preview1.19506.1 7 2025/5/27
3.0.3 5 2025/5/27
3.0.2 7 2025/5/27
3.0.1 8 2025/5/27
3.0.0 7 2025/5/27
3.0.0-rc1.19456.10 6 2025/5/27
3.0.0-preview9.19423.4 7 2025/5/27
3.0.0-preview8.19405.4 5 2025/5/28
3.0.0-preview7.19362.4 8 2025/5/27
3.0.0-preview6.19304.6 5 2025/5/27
3.0.0-preview5.19227.9 6 2025/10/10
3.0.0-preview4.19216.2 6 2025/5/27
3.0.0-preview3.19153.1 8 2025/5/27
3.0.0-preview.19074.2 5 2025/5/27
3.0.0-preview.18572.1 6 2025/5/27
2.2.0 7 2025/4/17
2.2.0-preview3-35497 8 2025/5/27
2.2.0-preview2-35157 6 2025/5/27
2.2.0-preview1-35029 7 2025/5/27
2.1.1 7 2025/5/27
2.1.0 6 2025/5/27
2.1.0-rc1-final 8 2025/5/27
2.1.0-preview2-final 6 2025/5/27
2.1.0-preview1-final 8 2025/5/27
2.0.0 11 2025/5/27
2.0.0-preview2-final 6 2025/5/27
2.0.0-preview1-final 9 2025/5/27
1.1.1 9 2025/5/28
1.1.0 9 2025/5/27
1.1.0-preview1-final 7 2025/5/27
1.0.2 5 2025/5/27
1.0.1 7 2025/5/27
1.0.0 10 2025/5/27
1.0.0-rc2-final 8 2025/5/27
1.0.0-rc1-final 6 2025/5/27