# yocto > yocto is a free, open-source (Apache-2.0) inversion-of-control (IoC) / dependency injection container for .NET 10 from MILL5. It is a drop-in IServiceProvider for Microsoft.Extensions.DependencyInjection and ASP.NET Core (passes all 143 tests in Microsoft.Extensions.DependencyInjection.Specification.Tests 10.0), and adds child containers, per-thread and pooled lifetimes, modules, and build-time validation in about 1,200 lines of C# (excluding comments). Install with `dotnet add package yocto`. Built by Microsoft MVP Richard Crane at MILL5. Key facts: - NuGet: yocto (core), yocto.Wpf (XAML markup extension) — version 3.0.0 - Target: net10.0 (yocto 1.x/2.x for .NET Framework, .NET Standard, and Xamarin are no longer maintained) - Namespace: Yocto (yocto.Wpf: Yocto.Wpf) - Dependency: Microsoft.Extensions.DependencyInjection.Abstractions only - Lifetimes: Multiple (transient, default), Singleton (optionally eager), Scoped, PerThread, Pooled, Instance (never disposed), custom via Lifetimes.Register - Features: keyed services ([FromKeyedServices], [ServiceKey], KeyedService.AnyKey), open generics, IEnumerable, child containers, IServiceScopeFactory, IAsyncDisposable, Validate() for missing/circular/captive dependencies, IModule, assembly registration, Application.Current ambient container, Native AOT annotations - ASP.NET Core: builder.Host.UseServiceProviderFactory(new YoctoServiceProviderFactory()) - Source: https://github.com/MILL5/yocto - Website: https://mill5.github.io/yocto/ - License: Apache 2.0 (free, open source) - NuGet downloads: 43K+ - Author: Richard Crane (Microsoft MVP, Founder of MILL5) — https://mvp.microsoft.com/en-US/MVP/profile/10ce0bc0-7536-43f6-b28c-e9601a4a0d0d - Publisher: MILL5, LLC — https://mill5.com (Boston-based Microsoft Gold Partner) - Podcast: Inventing Fire with AI — https://inventingfirewith.ai - Support: rich@mill5.com ## Quick start ```csharp using Yocto; using var container = new Container(); container.RegisterSingleton(); container.Register(); // Greeter(IClock clock) is constructor-injected container.Validate(); var greeter = container.Resolve(); ``` ## Docs - [Getting started](https://mill5.github.io/yocto/getting-started/): install, register, resolve, lifetimes, ASP.NET Core - [Lifetimes](https://mill5.github.io/yocto/guides/lifetimes/): Multiple, Singleton, Scoped, PerThread, Pooled, Instance, custom lifetimes, disposal order - [ASP.NET Core and Generic Host](https://mill5.github.io/yocto/guides/aspnet-core/): YoctoServiceProviderFactory, ConfigureContainer, BuildYoctoServiceProvider, Populate - [Keyed and generic services](https://mill5.github.io/yocto/guides/keyed-and-generic-services/): service keys, open generics, RegisterEnumerable, ResolveAll - [Child containers and scopes](https://mill5.github.io/yocto/guides/child-containers/): CreateChildContainer, ContainerBuilder, Application.Push/Pop - [Modules](https://mill5.github.io/yocto/guides/modules/): IModule, RegisterModule, RegisterAssembly - [WPF and XAML](https://mill5.github.io/yocto/guides/wpf/): yocto.Wpf ResolveExtension - [Validation and Native AOT](https://mill5.github.io/yocto/guides/validation-and-aot/): Validate, ValidateOnBuild, trimming - [Migrating to yocto 3](https://mill5.github.io/yocto/guides/migrating-to-v3/): API mapping from 1.x/2.x ## Related MILL5 projects - [Pineapple](https://mill5.github.io/pineapple/) — Guava-inspired core utilities for .NET - [FastSearch](https://mill5.github.io/FastSearch/) — Fast, low-memory substring search for .NET - [M5.BloomFilter](https://github.com/MILL5/M5.BloomFilter) — Bloom filters for .NET - [Polygon.Net](https://github.com/MILL5/Polygon.Net) — C# wrapper for the Polygon.io API ## Optional - [FAQ](https://mill5.github.io/yocto/faq/) - [Changelog](https://mill5.github.io/yocto/changelog/)