Skip to content

Releases: simpleinjector/SimpleInjector

Simple Injector v4.6.1

23 Jul 16:51
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Improvements

Simple Injector core library

  • #734 When using the Container.RegisterConditional(Type, Func<TypeFactoryContext, Type>, Lifestyle, Predicate<PredicateContext>) overload, Simple Injector would invalidly supply the Func<TypeFactoryContext, Type> delegate with a TypeFactoryContext instance whose Consumer property invalidly contained a non-null value, when the service type was resolved as root type.. This regression was introduced in v4.5.2.

Simple Injector v4.5.3

23 Jul 16:49
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Improvements

Simple Injector core library

  • #734 When using the Container.RegisterConditional(Type, Func<TypeFactoryContext, Type>, Lifestyle, Predicate<PredicateContext>) overload, Simple Injector would invalidly supply the Func<TypeFactoryContext, Type> delegate with a TypeFactoryContext instance whose Consumer property invalidly contained a non-null value, when the service type was resolved as root type.. This regression was introduced in v4.5.2.

Simple Injector v4.6

11 May 22:54
Compare
Choose a tag to compare

Release Notes

This release can be downloaded using NuGet.

The most prominent improvements in this release are:

  • New fluent configuration model for ASP.NET Core that aims to simplify integration. Please read the documentation for more details.
  • New integration packages for non-ASP.NET Core environments that still require IServiceCollection, such as .NET Core Console Applications and .NET Core 2.1 Generic Host. Read the documentation here and here for more details.
  • Ability to visualize object graphs with fully qualified type names. Implemented by @kwlin.

Breaking changes

Simple Injector core library

  • #699 ExpressionBuiltEventArgs ctor marked obsolete.
  • #701 SimpleInjector.Scope default ctor marked obsolete.

Features and improvements

Simple Injector core library

  • #685 VisualizeObjectGraph can now generate fully qualified type names. Thanks to @kwlin for implementing this.
  • #691 Added Container.Collection.Append(Type, Type, Lifestyle) overload.
  • #706 Added the ability to ignore disposing scoped and singleton components.
  • #681 Extra information added to obsolete messages.
  • #689 Common System.Object methods (ToString, GetHashCode, Equals, and GetType) are now hidden from common API classes when using IntelliSense.

ASP.NET Core Integration packages

  • #684 New fluent API introduced. See the documentation for more details.
  • #683 Prevented double disposing cross-wired dependencies.

[NEW] ServiceCollection Integration packages #639

This is a new integration package that aims to simplify cross wiring on top of ServiceCollection. It contains the core functionality that is used by Generic Host and ASP.NET Core integration packages. See the documentation for more details.

[NEW] Generic Host Integration packages #639

This is a new integration package that simplifies working with .NET Core 2.1 Generic Host applications. It can be use both as part of your ASP.NET Core application and as .NET Core Console application. See the documentation for more details.

Simple Injector v4.5.2

06 May 16:56
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Improvements

Simple Injector core library

  • #693 InjectionConsumerInfo.Equals can throw a NullReferenceException.
  • #695 Container.GetRegistration and Container.GetService methods lack null check.
  • #696 InjectionTargetInfo.Equals can throw a NullReferenceException.
  • #702 Improve error reporting when resolving Scope instances when there is no active scope.
  • #703 Applying proxy or Scoped decorators using 'decorator-type factory' fails with NullReferenceException on uncontrolled collections.
  • #704 Supplying an injected Func<Scope, T> decoratee factory with a container-less Scope throws NullReferenceException.

Simple Injector v4.5.1

22 Mar 10:22
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Improvements

Simple Injector core library

  • #678 Container controlled collections now support Contains and IndexOf.

Simple Injector v4.5

21 Mar 18:41
Compare
Choose a tag to compare

Release Notes

This release can be downloaded using NuGet.

The most prominent improvements in this release are:

  • The diagnostics will warn when injected injected collections are iterated/used inside constructors of singleton consumers.
  • The introduction of a Container.ContainerScope property that allows access to the singleton Scope.
  • The introduction of an Options.ResolveUnregisteredConcreteTypes switch that allows disabling resolving unregistered concrete types. Users are advised to change the setting to false. This prevents surprises in the future, as we are changing the default behavior to false in v5.0.
  • The addition of integration for ASP.NET Core 2.0 Razor Pages. The SimpleInjector.Integration.AspNetCore.Mvc package contains a new SimpleInjectorPageModelActivatorProvider class that can be added to ASP.NET's IServiceCollection and a container.RegisterPageModels(app) extension method that can be used to register Razor Page Models.

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

  • #377 Container.Options.ResolveUnregisteredConcreteTypes switch introduced that allows disabling resolving unregistered concrete types.
  • #648 Added information about lifestyles to when the container visualized object graph (both inside the VS debugger and when calling VisualizeObjectGraph). Special thanks to our new contributor @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.

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.

Simple Injector v4.5.0-beta1

14 Mar 16:32
Compare
Choose a tag to compare
Pre-release

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.

Simple Injector v4.4.3

01 Jan 12:52
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Improvements

Simple Injector core library

  • Several exception messages improved

Simple Injector v4.4.2

01 Dec 16:54
Compare
Choose a tag to compare

Release Notes

Simple Injector can be downloaded using NuGet.

Bug fixes

Simple Injector core library

  • Failing to resolve service with covariant generic parameter for constrained implementation. #638.

Simple Injector v4.4

02 Nov 23:24
Compare
Choose a tag to compare

Release Notes

This release can be downloaded using NuGet.

The most prominent improvements are:

  • the availability of a .NET Standard 2.0 version of the Simple Injector core library, which limits the number of installed NuGet packages on machines
  • support for List<T> and Collection<T> dependencies.

Features and improvements

Simple Injector core library

  • #559 NuGet package now contains a.NET Standard 2.0 version. Special thanks to @borrrden for this.
  • #545 List<T> and Collection<T> dependencies are now supported out of the box. Any collection, registered using Collection.Register can now be injected and resolved as either a List<T> or Collection<T>.
  • #369 In case Simple Injector throws an exception explaining that the container is either locked or disposed, the .NET Standard 2.0 version now includes the stack trace that caused the container to either be locked or disposed. This information was already available in .NET 4.0 and .NET 4.5 versions.

Simple Injector ASP.NET Core integration

  • #585 AutoCrossWireAspNetComponents overload added that accepts IServiceProvider.

Bug fixes

Simple Injector core library

  • #627 Registration of collections of variant types where implementation type is unknown to Simple Injector, especially when registering Registration instances through Collection.Register and Collection.Append failed.

Simple Injector Web API integration package

  • #628 Use of EnableHttpRequestMessageTracking under .NET <= 4.6.x could cause a memory leak.

Simple Injector ASP.NET Core integration

  • #588 SimpleInjectorControllerActivator will not resolve unregistered controllers from ASP.NET Core anymore.