github simpleinjector/SimpleInjector v4.5.0-beta1
Simple Injector v4.5.0-beta1

latest releases: v5.5.0, v5.4.6, v5.4.5...
pre-release5 years ago

Release Notes

This beta release can be downloaded using NuGet.

The most prominent improvements in this release are:

  • The prevention of iteration of injected collections inside constructors of Singleton consumers.
  • The introduction of a ContainerScope that allows access to the singleton Scope.
  • The addition of ASP.NET Core 2.0 Razor Page integration.

Breaking changes

Simple Injector core library

  • #554 Iterating collections with scoped or transient dependencies inside a singleton consumer now causes an exception when resolved or verified to prevent captive dependencies/lifestyle mismatches. A suppression can be added in case the warning is a false positive.
  • #670 AdvancedExtensions.IsVerifying(Container) extension method was made obsolete. You can use the Container.IsVerifying property instead.

Features and improvements

Simple Injector core library

  • #648 Added information about lifestyles to when the container visualized object graph (both inside the VS debugger and when calling VisualizeObjectGraph). Special thanks to @kwlin for implementing this.
  • #664 New Container.ContainerScope property allows access to the container-global Scope, which can be used to register objects for disposal and execute delegates when the container is disposed, while allowing to retrieve created disposables, which enables async dispose.
  • #603 New Collection.Append and Collection.AppendInstance overloads added that simplify appending registrations (and instances) to collections.

ASP.NET Core Integration packages

  • #572 Added ASP.NET 2.0 Razor Page support to the ASP.NET Core MVC integration package. There is a new SimpleInjectorPageModelActivatorProvider that can be registered and a container.RegisterPageModels(app) extension method that can be used to register Razor Page Models.

ASP.NET (Web Forms / MVC) Integration

  • #671 Prevented WebRequestLifestyle from reusing the same Scope instance over multiple containers inside the same web request.

Bug fixes

Simple Injector core library

  • #540 Removed the use of ThreadLocal<T> from the decorator sub system, which could cause memory leaks in case the user didn't dispose the container.

Don't miss a new SimpleInjector release

NewReleases is sending notifications on new releases.