Changelog
3.0.0 — 2026-10-13
A ground-up rewrite for .NET 10. The 1.x/2.x codebases (.NET Framework 4.0/4.7.2, .NET Standard 1.0/1.1/2.0, Xamarin iOS, OWIN) were removed.
Added
- Drop-in
IServiceProviderfor Microsoft.Extensions.DependencyInjection and ASP.NET Core:YoctoServiceProviderFactory,BuildYoctoServiceProvider,Populate. Passes all 143 tests in Microsoft.Extensions.DependencyInjection.Specification.Tests 10.0. - Scoped lifetime (
AsScoped,RegisterScoped) andIServiceScopeFactory. - Keyed services, including
[FromKeyedServices],[ServiceKey], andKeyedService.AnyKey. - Open generic registrations.
IEnumerable<T>constructor injection.IAsyncDisposablesupport andDisposeAsync. Instances are disposed in reverse creation order.Validate()andValidateOnBuildto detect missing, ambiguous, circular, and captive dependencies.- Runtime circular-dependency detection.
IModuleandRegisterModule.UnregisterandIRegistration.Remove.- Native AOT and trimming annotations (
IsAotCompatible). yocto.Wpfpackage with{yocto:Resolve {x:Type …}}.
Changed
- The namespace is now
Yocto(wasyocto). new Container()is public. Child containers areIContainer.- The greediest constructor satisfiable from the registration’s container wins, and is selected again after registrations change. Registration order no longer matters.
- Lifetimes are configured with
WithLifetime(name, options). Constants moved fromInstancingtoLifetimes.ILifetimeFactoryandIInstanceFactorywere redesigned aroundLifetimeContext. RegisterEnumerablereplacesAsEnumerable. Enumerables are stored per container instead of in a static dictionary.RegisterInstanceno longer disposes the instance.Application.Push/Popare static, andApplication.Currentfollows them.RegisterAssemblypasses the target container toAssemblyRegistration.Initialize(2.x always passedApplication.Current).- Failures throw
InvalidOperationExceptioninstead ofException.
Removed
- Targets other than .NET 10, and their compatibility shims.
yocto.owin(an unimplemented stub).ResolveResourceExtension(name-based lookup). Useyocto.Wpf’sResolveExtension.
2.0.10-alpha — 2019
Last 2.x prerelease (.NET Standard 2.0, .NET Framework 4.0/4.7.2, XAML ResolveResourceExtension).