![]() |
VOOZH | about |
dotnet add package Microsoft.Extensions.DependencyInjection --version 10.0.9
NuGet\Install-Package Microsoft.Extensions.DependencyInjection -Version 10.0.9
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />Project file
paket add Microsoft.Extensions.DependencyInjection --version 10.0.9
#r "nuget: Microsoft.Extensions.DependencyInjection, 10.0.9"
#:package Microsoft.Extensions.DependencyInjection@10.0.9
#addin nuget:?package=Microsoft.Extensions.DependencyInjection&version=10.0.9Install as a Cake Addin
#tool nuget:?package=Microsoft.Extensions.DependencyInjection&version=10.0.9Install as a Cake Tool
Supports the dependency injection (DI) software design pattern which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies.
Provides an implementation of the DI interfaces found in the Microsoft.Extensions.DependencyInjection.Abstractions package.
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}\")");
}
}
The main types provided by this library are:
Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactoryMicrosoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensionsMicrosoft.Extensions.DependencyInjection.ServiceProviderMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HostingMicrosoft.Extensions.OptionsMicrosoft.Extensions.DependencyInjection is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
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. |
|
|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. |
|
|
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 |
|
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications. |
|
|
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 |
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
|
|
|
files-community/Files
A modern file manager that helps users organize their files and folders.
|
|
|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
|
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
|
|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
Tyrrrz/YoutubeDownloader
Downloads videos and playlists from YouTube
|
|
|
Flow-Launcher/Flow.Launcher
:mag: Quick file search & app launcher for Windows with community-made plugins
|
|
|
Tichau/FileConverter
File Converter is a very simple tool which allows you to convert and compress files using the context menu in windows explorer.
|
|
|
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.
|
|
|
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+.
|
|
|
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
|
|
|
babalae/better-genshin-impact
📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 | 自动烹饪 - UI Automation Testing Tools For Genshin Impact
|
|
|
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
|
|
|
SubtitleEdit/subtitleedit
the subtitle editor :)
|
|
|
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
|
|
|
LuckyPennySoftware/MediatR
Simple, unambitious mediator implementation in .NET
|
|
|
chocolatey/choco
Chocolatey - the package manager for Windows
|
|
|
Tyrrrz/DiscordChatExporter
Saves Discord chat logs to a file
|
|
|
memstechtips/Winhance
Application designed to optimize, customize and enhance your Windows experience.
|
|
|
gui-cs/Terminal.Gui
Cross Platform Terminal UI toolkit for .NET
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 8,977 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 44,748 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 44,466 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 73,991 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 58,126 | 2/10/2026 |
| 10.0.9 | 2,326,953 | 6/9/2026 |
| 10.0.8 | 12,173,372 | 5/12/2026 |
| 10.0.7 | 15,753,325 | 4/21/2026 |
| 10.0.6 | 5,835,978 | 4/14/2026 |
| 10.0.5 | 20,729,131 | 3/12/2026 |
| 10.0.4 | 5,252,940 | 3/10/2026 |
| 10.0.3 | 22,683,007 | 2/10/2026 |
| 10.0.2 | 25,375,497 | 1/13/2026 |
| 10.0.1 | 21,244,195 | 12/9/2025 |
| 9.0.17 | 196,120 | 6/9/2026 |
| 9.0.16 | 940,022 | 5/12/2026 |
| 9.0.15 | 2,059,240 | 4/14/2026 |
| 9.0.14 | 2,659,558 | 3/10/2026 |
| 9.0.13 | 2,776,483 | 2/10/2026 |
| 9.0.12 | 3,757,919 | 1/13/2026 |