Microsoft.Extensions.DependencyInjection 9.0.0-preview.1.24080.9
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.DefaultServiceProviderFactoryMicrosoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensionsMicrosoft.Extensions.DependencyInjection.ServiceProvider
Additional Documentation
- Conceptual documentation
- API documentation
Related Packages
Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HostingMicrosoft.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.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
|
153 |
|
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
119 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
When using NuGet 3.x this package requires at least version 3.4.
|
106 |
|
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
|
86 |
|
Microsoft.AspNetCore.Mvc.Core
ASP.NET Core MVC core components. Contains common action result types, attribute routing, application model conventions, API explorer, application parts, filters, formatters, model binding, and more.
Commonly used types:
Microsoft.AspNetCore.Mvc.AreaAttribute
Microsoft.AspNetCore.Mvc.BindAttribute
Microsoft.AspNetCore.Mvc.ControllerBase
Microsoft.AspNetCore.Mvc.FromBodyAttribute
Microsoft.AspNetCore.Mvc.FromFormAttribute
Microsoft.AspNetCore.Mvc.RequireHttpsAttribute
Microsoft.AspNetCore.Mvc.RouteAttribute
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/33c2d01092d9a1b7a583fe99a50b15686e2b7de9
|
70 |
|
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
66 |
|
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
|
58 |
|
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.
This package was built from the source code at https://github.com/aspnet/Mvc/tree/a6199bbfbab05583f987bae322fb04566841aaea
|
57 |
|
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
|
48 |
|
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
This package was built from the source code at https://github.com/aspnet/Mvc/tree/a6199bbfbab05583f987bae322fb04566841aaea
|
38 |
|
Microsoft.AspNetCore.Mvc.Core
ASP.NET Core MVC core components. Contains common action result types, attribute routing, application model conventions, API explorer, application parts, filters, formatters, model binding, and more.
Commonly used types:
Microsoft.AspNetCore.Mvc.AreaAttribute
Microsoft.AspNetCore.Mvc.BindAttribute
Microsoft.AspNetCore.Mvc.ControllerBase
Microsoft.AspNetCore.Mvc.FromBodyAttribute
Microsoft.AspNetCore.Mvc.FromFormAttribute
Microsoft.AspNetCore.Mvc.RequireHttpsAttribute
Microsoft.AspNetCore.Mvc.RouteAttribute
This package was built from the source code at https://github.com/aspnet/Mvc/tree/a6199bbfbab05583f987bae322fb04566841aaea
|
36 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source code at https://github.com/aspnet/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
|
32 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
30 |
|
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
|
30 |
|
MongoDB.Entities
A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management.
|
27 |
|
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/39e0501ee91dcf2b9b885d647795184815fb0408
|
27 |
|
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.
|
27 |
|
FluentMigrator
FluentMigrator is a database migration framework for .NET written in C#. The basic idea is that you can create migrations which are simply classes that derive from the Migration base class and have a Migration attribute with a unique version number attached to them. Upon executing FluentMigrator, you tell it which version to migrate to and it will run all necessary migrations in order to bring your database up to that version. In addition to forward migration support, FluentMigrator also supports different ways to execute the migrations along with selective migrations called profiles and executing arbitrary SQL.
|
27 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.1.24080.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.1.24080.9)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET 8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.1.24080.9)
.NET 9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.1.24080.9)
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0-preview.1.24080.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.1.24080.9)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET Standard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-preview.1.24080.9)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.0 | 2 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 4 | 10/18/2025 |
| 10.0.0-rc.1.25451.107 | 7 | 09/10/2025 |
| 10.0.0-preview.7.25380.108 | 8 | 08/14/2025 |
| 10.0.0-preview.6.25358.103 | 7 | 07/18/2025 |
| 10.0.0-preview.5.25277.114 | 11 | 06/10/2025 |
| 10.0.0-preview.4.25258.110 | 14 | 05/15/2025 |
| 10.0.0-preview.3.25171.5 | 15 | 04/15/2025 |
| 10.0.0-preview.2.25163.2 | 14 | 03/20/2025 |
| 10.0.0-preview.1.25080.5 | 19 | 02/28/2025 |
| 9.0.11 | 2 | 11/11/2025 |
| 9.0.10 | 3 | 10/18/2025 |
| 9.0.9 | 5 | 09/11/2025 |
| 9.0.8 | 8 | 08/09/2025 |
| 9.0.7 | 7 | 07/09/2025 |
| 9.0.6 | 8 | 06/12/2025 |
| 9.0.5 | 12 | 05/15/2025 |
| 9.0.4 | 14 | 04/12/2025 |
| 9.0.3 | 13 | 03/20/2025 |
| 9.0.2 | 18 | 02/28/2025 |
| 9.0.1 | 16 | 01/18/2025 |
| 9.0.0 | 18 | 11/19/2024 |
| 9.0.0-rc.2.24473.5 | 16 | 11/19/2024 |
| 9.0.0-rc.1.24431.7 | 19 | 10/03/2024 |
| 9.0.0-preview.7.24405.7 | 21 | 10/07/2024 |
| 9.0.0-preview.6.24327.7 | 18 | 10/07/2024 |
| 9.0.0-preview.5.24306.7 | 20 | 08/13/2024 |
| 9.0.0-preview.4.24266.19 | 21 | 10/07/2024 |
| 9.0.0-preview.3.24172.9 | 18 | 10/07/2024 |
| 9.0.0-preview.2.24128.5 | 19 | 10/07/2024 |
| 9.0.0-preview.1.24080.9 | 17 | 06/10/2024 |
| 8.0.1 | 18 | 11/19/2024 |
| 8.0.0 | 23 | 03/08/2024 |
| 8.0.0-rc.2.23479.6 | 19 | 10/07/2024 |
| 8.0.0-rc.1.23419.4 | 19 | 10/07/2024 |
| 8.0.0-preview.7.23375.6 | 17 | 10/07/2024 |
| 8.0.0-preview.6.23329.7 | 14 | 10/07/2024 |
| 8.0.0-preview.5.23280.8 | 16 | 10/07/2024 |
| 8.0.0-preview.4.23259.5 | 16 | 10/07/2024 |
| 8.0.0-preview.3.23174.8 | 15 | 10/07/2024 |
| 8.0.0-preview.2.23128.3 | 18 | 10/07/2024 |
| 8.0.0-preview.1.23110.8 | 15 | 09/24/2024 |
| 7.0.0 | 29 | 12/02/2022 |
| 7.0.0-rc.2.22472.3 | 17 | 10/07/2024 |
| 7.0.0-rc.1.22426.10 | 18 | 10/07/2024 |
| 7.0.0-preview.7.22375.6 | 18 | 10/07/2024 |
| 7.0.0-preview.6.22324.4 | 16 | 10/07/2024 |
| 7.0.0-preview.5.22301.12 | 19 | 10/07/2024 |
| 7.0.0-preview.4.22229.4 | 15 | 10/07/2024 |
| 7.0.0-preview.3.22175.4 | 20 | 10/07/2024 |
| 7.0.0-preview.2.22152.2 | 17 | 10/07/2024 |
| 7.0.0-preview.1.22076.8 | 18 | 10/07/2024 |
| 6.0.2 | 17 | 11/19/2024 |
| 6.0.1 | 32 | 11/18/2022 |
| 6.0.0 | 35 | 02/01/2022 |
| 6.0.0-rc.2.21480.5 | 14 | 10/07/2024 |
| 6.0.0-rc.1.21451.13 | 18 | 10/07/2024 |
| 6.0.0-preview.7.21377.19 | 18 | 10/07/2024 |
| 6.0.0-preview.6.21352.12 | 17 | 10/07/2024 |
| 6.0.0-preview.5.21301.5 | 19 | 10/07/2024 |
| 6.0.0-preview.4.21253.7 | 16 | 10/07/2024 |
| 6.0.0-preview.3.21201.4 | 16 | 10/07/2024 |
| 6.0.0-preview.2.21154.6 | 17 | 10/07/2024 |
| 6.0.0-preview.1.21102.12 | 17 | 10/07/2024 |
| 5.0.2 | 93 | 12/17/2021 |
| 5.0.1 | 25 | 12/15/2021 |
| 5.0.0 | 53 | 12/23/2021 |
| 5.0.0-rc.2.20475.5 | 18 | 10/07/2024 |
| 5.0.0-rc.1.20451.14 | 15 | 10/07/2024 |
| 5.0.0-preview.8.20407.11 | 20 | 10/07/2024 |
| 5.0.0-preview.7.20364.11 | 15 | 10/07/2024 |
| 5.0.0-preview.6.20305.6 | 16 | 10/07/2024 |
| 5.0.0-preview.5.20278.1 | 18 | 10/07/2024 |
| 5.0.0-preview.4.20251.6 | 18 | 10/07/2024 |
| 5.0.0-preview.3.20215.2 | 14 | 09/18/2024 |
| 5.0.0-preview.2.20160.3 | 16 | 10/07/2024 |
| 5.0.0-preview.1.20120.4 | 18 | 10/07/2024 |
| 3.1.32 | 20 | 09/09/2024 |
| 3.1.31 | 21 | 08/20/2024 |
| 3.1.30 | 17 | 10/07/2024 |
| 3.1.29 | 16 | 10/07/2024 |
| 3.1.28 | 18 | 10/02/2024 |
| 3.1.27 | 22 | 10/07/2024 |
| 3.1.26 | 17 | 10/07/2024 |
| 3.1.25 | 20 | 10/06/2024 |
| 3.1.24 | 20 | 09/07/2024 |
| 3.1.23 | 19 | 10/04/2024 |
| 3.1.22 | 18 | 10/07/2024 |
| 3.1.21 | 21 | 10/05/2024 |
| 3.1.20 | 18 | 09/25/2024 |
| 3.1.19 | 16 | 10/04/2024 |
| 3.1.18 | 24 | 01/10/2022 |
| 3.1.17 | 24 | 10/07/2024 |
| 3.1.16 | 17 | 10/07/2024 |
| 3.1.15 | 16 | 10/03/2024 |
| 3.1.14 | 16 | 10/07/2024 |
| 3.1.13 | 18 | 10/07/2024 |
| 3.1.12 | 21 | 08/29/2022 |
| 3.1.11 | 18 | 10/07/2024 |
| 3.1.10 | 22 | 09/19/2024 |
| 3.1.9 | 19 | 10/07/2024 |
| 3.1.8 | 20 | 09/05/2024 |
| 3.1.7 | 18 | 10/07/2024 |
| 3.1.6 | 20 | 11/23/2022 |
| 3.1.5 | 16 | 09/26/2024 |
| 3.1.4 | 17 | 01/14/2022 |
| 3.1.3 | 19 | 09/13/2024 |
| 3.1.2 | 19 | 08/21/2024 |
| 3.1.1 | 17 | 10/03/2024 |
| 3.1.0 | 21 | 01/18/2023 |
| 3.1.0-preview3.19553.2 | 18 | 10/07/2024 |
| 3.1.0-preview2.19525.4 | 19 | 10/07/2024 |
| 3.1.0-preview1.19506.1 | 17 | 09/03/2024 |
| 3.0.3 | 17 | 09/07/2024 |
| 3.0.2 | 16 | 10/07/2024 |
| 3.0.1 | 20 | 09/30/2024 |
| 3.0.0 | 20 | 09/06/2024 |
| 3.0.0-rc1.19456.10 | 18 | 10/07/2024 |
| 3.0.0-preview9.19423.4 | 22 | 10/07/2024 |
| 3.0.0-preview8.19405.4 | 16 | 10/07/2024 |
| 3.0.0-preview7.19362.4 | 18 | 10/05/2024 |
| 3.0.0-preview6.19304.6 | 22 | 10/07/2024 |
| 3.0.0-preview5.19227.9 | 18 | 10/07/2024 |
| 3.0.0-preview4.19216.2 | 18 | 10/07/2024 |
| 3.0.0-preview3.19153.1 | 18 | 10/07/2024 |
| 3.0.0-preview.19074.2 | 14 | 10/06/2024 |
| 3.0.0-preview.18572.1 | 16 | 10/07/2024 |
| 2.2.0 | 35 | 07/26/2022 |
| 2.2.0-preview3-35497 | 20 | 10/07/2024 |
| 2.2.0-preview2-35157 | 15 | 09/21/2024 |
| 2.2.0-preview1-35029 | 18 | 09/02/2024 |
| 2.1.1 | 21 | 09/21/2024 |
| 2.1.0 | 19 | 10/07/2024 |
| 2.1.0-rc1-final | 18 | 09/11/2024 |
| 2.1.0-preview2-final | 20 | 10/07/2024 |
| 2.1.0-preview1-final | 18 | 09/27/2024 |
| 2.0.0 | 24 | 10/07/2024 |
| 2.0.0-preview2-final | 20 | 09/07/2024 |
| 2.0.0-preview1-final | 22 | 09/27/2024 |
| 1.1.1 | 17 | 09/25/2024 |
| 1.1.0 | 21 | 10/07/2024 |
| 1.1.0-preview1-final | 17 | 09/23/2024 |
| 1.0.2 | 17 | 10/07/2024 |
| 1.0.1 | 18 | 10/07/2024 |
| 1.0.0 | 19 | 10/07/2024 |
| 1.0.0-rc2-final | 15 | 10/07/2024 |
| 1.0.0-rc1-final | 21 | 10/07/2024 |