Microsoft.Extensions.DependencyInjection 10.0.9 (original) (raw)
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
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.
| Product | Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
.NETFramework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- System.Threading.Tasks.Extensions (>= 4.6.3)
.NETStandard 2.1
net10.0
net8.0
net9.0
NuGet packages (12.1K)
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.DependencyInjection:
| Package | Downloads |
|---|---|
| Microsoft.Extensions.Logging Logging infrastructure default implementation for Microsoft.Extensions.Logging. | 6.9B |
| Microsoft.Extensions.Hosting Hosting and startup infrastructures for applications. | 1.4B |
| 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 | 1.0B |
| Microsoft.AspNetCore.Hosting ASP.NET Core hosting infrastructure and startup logic for web applications. | 759.2M |
| 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/dotnet/tree/f7b4c5716faaee8fb8a289aed29118cad955c45f | 318.7M |
GitHub repositories (1.2K)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.DependencyInjection:
| Repository | Stars | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| jellyfin/jellyfin The Free Software Media System - Server Backend & API | 53.3K | ||||||||
| files-community/Files A modern file manager that helps users organize their files and folders. | 43.9K | ||||||||
| microsoft/semantic-kernel Integrate cutting-edge LLM technology quickly and easily into your apps | 28.1K | ||||||||
| dotnet/maui .NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop. | 23.3K | ||||||||
| dotnet/roslyn The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. | 20.5K | ||||||||
| Tyrrrz/YoutubeDownloader Downloads videos and playlists from YouTube | 15.3K | ||||||||
| Flow-Launcher/Flow.Launcher :mag: Quick file search & app launcher for Windows with community-made plugins | 15.0K | ||||||||
| Tichau/FileConverter File Converter is a very simple tool which allows you to convert and compress files using the context menu in windows explorer. | 14.6K | ||||||||
| abpframework/abp Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation. | 14.3K | ||||||||
| App-vNext/Polly Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+. | 14.2K | ||||||||
| Sonarr/Sonarr Smart PVR for newsgroup and bittorrent users. | 14.0K | ||||||||
| babalae/better-genshin-impact 📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 | 自动烹饪 - UI Automation Testing Tools For Genshin Impact | 13.9K |
| Radarr/Radarr Movie organizer/manager for usenet and torrent users. | 13.8K | ||||||||
| SubtitleEdit/subtitleedit the subtitle editor :) | 13.2K | ||||||||
| dotnet/AspNetCore.Docs Documentation for ASP.NET Core | 13.1K | ||||||||
| LuckyPennySoftware/MediatR Simple, unambitious mediator implementation in .NET | 11.8K | ||||||||
| chocolatey/choco Chocolatey - the package manager for Windows | 11.4K | ||||||||
| Tyrrrz/DiscordChatExporter Saves Discord chat logs to a file | 11.4K | ||||||||
| gui-cs/Terminal.Gui Cross Platform Terminal UI toolkit for .NET | 11.1K | ||||||||
| memstechtips/Winhance Application designed to optimize, customize and enhance your Windows experience. | 11.0K |
Include prerelease
Include vulnerable
Include deprecated
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 5,650 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 41,859 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 43,487 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 71,825 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 56,782 | 2/10/2026 |
| 10.0.9 | 1,145,105 | 6/9/2026 |
| 10.0.8 | 11,083,185 | 5/12/2026 |
| 10.0.7 | 14,961,098 | 4/21/2026 |
| 10.0.6 | 5,623,188 | 4/14/2026 |
| 10.0.5 | 20,144,610 | 3/12/2026 |
| 10.0.4 | 5,053,530 | 3/10/2026 |
| 10.0.3 | 22,138,304 | 2/10/2026 |
| 10.0.2 | 24,824,536 | 1/13/2026 |
| 10.0.1 | 20,846,292 | 12/9/2025 |
| 9.0.17 | 107,868 | 6/9/2026 |
| 9.0.16 | 866,013 | 5/12/2026 |
| 9.0.15 | 1,984,717 | 4/14/2026 |
| 9.0.14 | 2,600,982 | 3/10/2026 |
| 9.0.13 | 2,727,983 | 2/10/2026 |
| 9.0.12 | 3,705,409 | 1/13/2026 |