Microsoft.Extensions.DependencyInjection 9.0.7
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
|
74 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
73 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
69 |
|
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
|
63 |
|
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
|
55 |
|
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
|
45 |
|
Pomelo.EntityFrameworkCore.MySql
Pomelo's MySQL database provider for Entity Framework Core.
|
44 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
When using NuGet 3.x this package requires at least version 3.4.
|
31 |
|
Dapr.Client
This package contains the reference assemblies for developing services using Dapr.
|
17 |
|
Dapr.AspNetCore
This package contains the reference assemblies for developing services using Dapr and AspNetCore.
|
16 |
|
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
|
15 |
|
Dapr.Common
Package Description
|
13 |
|
Microsoft.SemanticKernel.Core
Semantic Kernel core orchestration, runtime and functions.
This package is automatically installed by 'Microsoft.SemanticKernel' package with other useful packages.
Install this package manually only if you are selecting individual Semantic Kernel components.
|
13 |
|
Dapr.Common
Package Description
|
12 |
|
TensorFlow.NET
Google's TensorFlow full binding in .NET Standard.
Building, training and infering deep learning models.
https://tensorflownet.readthedocs.io
|
10 |
|
Elsa.Core
Elsa is a set of workflow libraries and tools that enable lean and mean workflowing capabilities in any .NET Core application.
This package contains the core of Elsa.
Tip: reference the `Elsa` package instead of this one.
|
10 |
|
TensorFlow.NET
Google's TensorFlow full binding in .NET Standard.
Building, training and infering deep learning models.
https://tensorflownet.readthedocs.io
|
9 |
|
TensorFlow.NET
Google's TensorFlow full binding in .NET Standard.
Building, training and infering deep learning models.
https://tensorflownet.readthedocs.io
|
8 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET 8.0
.NET 9.0
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET Standard 2.1
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.0-preview.6.25358.103 | 9 | 07/22/2025 |
| 9.0.7 | 7 | 07/22/2025 |
| 8.0.1 | 24 | 07/08/2025 |
| 8.0.0 | 65 | 07/07/2025 |
| 7.0.0-rc.1.22426.10 | 5 | 07/12/2025 |
| 7.0.0-preview.5.22301.12 | 5 | 07/11/2025 |
| 7.0.0-preview.4.22229.4 | 5 | 07/08/2025 |
| 6.0.1 | 85 | 07/07/2025 |
| 6.0.0 | 90 | 07/07/2025 |
| 6.0.0-rc.1.21451.13 | 6 | 07/12/2025 |
| 5.0.0 | 27 | 08/02/2025 |
| 3.1.24 | 4 | 07/11/2025 |
| 3.1.23 | 5 | 07/09/2025 |
| 3.1.8 | 4 | 07/09/2025 |