DryIoc.dll 6.0.0

Prefix Reserved
dotnet add package DryIoc.dll --version 6.0.0
                    
NuGet\Install-Package DryIoc.dll -Version 6.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DryIoc.dll" Version="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DryIoc.dll" Version="6.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DryIoc.dll" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DryIoc.dll --version 6.0.0
                    
#r "nuget: DryIoc.dll, 6.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DryIoc.dll@6.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DryIoc.dll&version=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DryIoc.dll&version=6.0.0
                    
Install as a Cake Tool

Hello Sailor,

Compile-time Dependency Injection (optional)

Compile-time DI gives faster startup, smaller footprint and AOT/trimming compatibility. Skip this section if you only need runtime DI — everything works without it.

On first dotnet build the package scaffolds your project:

File When copied
CompileTimeDI\Container.Generated.tt every build (refreshed from package)
CompileTimeDI\CompileTimeExampleServices.cs every build (refreshed from package)
CompileTimeDI\CompileTimeRegistrations.ttinclude first install only — safe to customize
CompileTimeDI\Container.Generated.cs first install only — regenerated by T4 on next build
.config\dotnet-tools.json first install only — dotnet-t4 tool

Usage

  1. Edit CompileTimeDI\CompileTimeRegistrations.ttinclude — add your services to GetContainerWithRegistrations() and set resolution roots.
  2. Build in Debug mode. The second build regenerates Container.Generated.cs via T4.
  3. Check Container.Generated.cs for the generated container and any warnings.
  4. Use the compile-time container (runtime registrations on the same container are the fallback):
var container = new Container(rules => rules
    .WithCompileTimeContainer(CompileTimeContainer.Instance));

Updating the package

Container.Generated.tt and CompileTimeExampleServices.cs are always refreshed. CompileTimeRegistrations.ttinclude, Container.Generated.cs, and .config\dotnet-tools.json are never overwritten.

Opting out

Add <SkipCompTimeGen>true</SkipCompTimeGen> to your project file to disable T4 regeneration.

T4 editing tools

  • VS Code: T4 Support
  • Visual Studio: ForTea (ReSharper)
  • Rider: native T4 support

Roadmap

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 was computed.  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.  net11.0 is compatible. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

  • .NETStandard 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (147)

Showing the top 5 NuGet packages that depend on DryIoc.dll:

Package Downloads
DryIoc.Microsoft.DependencyInjection

DryIoc adapter for Microsoft.Extensions.DependencyInjection

DryIoc.Owin.dll

DryIoc extension for OWIN

DryIoc.MefAttributedModel.dll

DryIoc.MefAttributedModel is DryIoc extension to support Microsoft Managed Extensibility Framework for DryIoc container

DryIoc.CommonServiceLocator.dll

Implementation of CommonServiceLocator for DryIoc container, see rationale at https://github.com/unitycontainer/commonservicelocator

DryIoc.WebApi.dll

DryIoc extension for ASP.NET WebAPI

GitHub repositories (20)

Showing the top 20 popular GitHub repositories that depend on DryIoc.dll:

Repository Stars
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
Prowlarr/Prowlarr
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers.
Lidarr/Lidarr
Looks and smells like Sonarr but made for music.
Readarr/Readarr
Book Manager and Automation (Sonarr for Ebooks)
digimezzo/dopamine-windows
Audio player which tries to make organizing and listening to music as simple and pretty as possible.
CXWorld/CapFrameX
Frametime capture and analysis tool
fifty-six/Scarab
An installer for Hollow Knight mods written with Avalonia.
Artemis-RGB/Artemis
Provides advanced unified lighting across many different brands RGB peripherals
Whisparr/Whisparr
reactiveui/splat
Cross-platform building blocks for .NET applications. Provides service location and dependency resolution, logging, platform-neutral images, colours and geometry, and unit test and design mode detection.
structuremap/structuremap
A Dependency Injection/Inversion of Control tool for .NET
kendryte/nncase
Open deep learning compiler stack for Kendryte AI accelerators ✨
danielpalme/IocPerformance
Performance comparison of .NET IoC containers
DevTeam/Pure.DI
Pure DI for .NET
Chaptarr/chaptarr
An audiobook and eBook collection manager.
2fast-team/2fast
Two-Factor Authenticator Supporting TOTP (Windows 10 & Android, iOS, Linux and macOS App)
appget/appget
Free and open package manager for Windows.
AndroidCoderPeng/CodeGenerator
软著代码生成器,基于 .NET 8 WPF(使用 CommunityToolkit.Mvvm),仅支持 Windows
dansiegel/Prism.Container.Extensions
The packages here provide additional extensions around the Prism Ioc abstractions. This allows for more advanced scenarios.
Version Downloads Last Updated
6.0.0 3,774 11/21/2026
6.0.0-preview-09 695,258 11/24/2024
6.0.0-preview-08 14,997 10/27/2024
6.0.0-preview-07 24,257 3/17/2024
6.0.0-preview-06 7,249 1/23/2024
5.4.3 3,363,315 11/12/2023
5.4.2 177,041 10/17/2023
5.4.1 494,510 6/10/2023
5.4.0 2,308,822 5/1/2023
5.4.0-preview-01 1,514 4/14/2023
5.3.4 381,085 3/13/2023
5.3.3 107,339 2/16/2023
5.3.2 28,363 2/9/2023
5.3.1 172,279 11/28/2022
5.3.0 276,156 11/10/2022
5.2.2 693,777 8/23/2022
5.2.1 43,211 8/9/2022
5.2.0 14,037 8/3/2022
5.1.0 422,113 5/20/2022
5.0.2 430,315 5/10/2022
Loading failed

## v6.0.0 Major feature release

### Bird view

- 10, 11 is now supported, interim .net versions dropped and net45 -> net472, netstandard2.0 -> netstandard2.1
- Decrease memory footprint without speed regression
- Remove Obsolete API (small things in more customizable parts of Container)
- Compile-time Dependency Injection (T4-based, AOT-friendly; see `readme.md` in the DryIoc.dll NuGet package)
- #492 Remove obsolete WithAutoFallbackResolution

### Features

- #695 Improve DryIoc.dll NuGet package CompileTime DI install/update experience
- #679 Add DryIoc own all-encompassing RegisterAttribute
- #676 Add the Settings.ThrowOnRegisteringDisposableTransient on the registration level to override the global setting
- #660 Populate on IRegistrator
- #638 Add the global test option to run all tests with WithoutUseInterpretation option
- #636 [question/feature request] keyed services in delegate resolution
- #632 MS DI AddKeyed... variant registration fails
- #618 Multiple same service key support mostly for DryIoc.MS.DI though it is already supported in DryIoc.MefAttributedModel
- #612 For the conditional singleton or the singleton registered with AnyKey - should we create a new singleton per condition or the resolution key?
- #512 Optimize injection of IResolverContext
- #504 Probably add the IDictionary<TServiceKey, TService> wrapper
- #503 [CompTimeDI] Replace partial methods with more flexible interface ICompileTimeContainer
- #495 [CompTimeDI] Automatically generate Resolution calls for the missing registrations to avoid manual RegisterPlaceholder
- #485 Add Rules to IResolverContext interface
- #480 Change Request.Container property to field and change its type from IContainer to Container
- #223 IAsyncDisposable is not being called after container.Dispose
- #212 Improve source package with T4 install experience

### Fixes

- #708 Missed parent parameter in IContainer.With overload
- #694 Singleton service resolved by scoped container, not root container
- #692 Resolve failed on Android(Avalonia)
- #690 DryIoc is not working together with Blazor InputFile component
- #685 Creating scopes via funcs is not thread-safe and fails sporadically with NullRef exception
- #672 Wrong decorator parameter with custom args
- #653 KeyValuePair exposes internal DryIoc structures
- #651 Resolving func-wrapper when having circular-dependency throws RecursiveDependencyDetected
- #648 [BUG] Resolve<> crashes with the misleading, casting-related Exception when class is also registered using RegisterInitializer
- #646 Resolve enforces passed arguments to be used (and fails because of it)
- #643 WithConcreteTypeDynamicRegistrations results in unintended instantiation
- #642 System.NullReferenceException: Object reference not set to an instance of an object
- #631 Conditional registrations
- #625 FactoryType is not forwarded in the RegisterMapping<TService, TRegisteredService> method
- #624 Consistent behavior of a faulty singleton
- #623 Scoped service decorator
- #610 ConstructorWithResolvableArguments conflicts with dynamic registrations
- #580 Scope is lost in IResolver inside scope because of singleton
- #535 Property injection is not working correctly when appending a new implementation for multiple registrations of the same interface and injecting an enumerable of the interface.
- #552 Compatibility with Android/iOS AOT compilation
- #532 [Xamarin.iOS] DryIocTypeResolver.Resolve (System.Type type) SIGABRT: Operation is not supported on this platform.