Releases: simpleinjector/SimpleInjector
Simple Injector v4.6.1
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 theFunc<TypeFactoryContext, Type>
delegate with aTypeFactoryContext
instance whoseConsumer
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
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 theFunc<TypeFactoryContext, Type>
delegate with aTypeFactoryContext
instance whoseConsumer
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
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
, andGetType
) 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
Release Notes
Simple Injector can be downloaded using NuGet.
Improvements
Simple Injector core library
- #693
InjectionConsumerInfo.Equals
can throw aNullReferenceException
. - #695
Container.GetRegistration
andContainer.GetService
methods lack null check. - #696
InjectionTargetInfo.Equals
can throw aNullReferenceException
. - #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 withNullReferenceException
on uncontrolled collections. - #704 Supplying an injected
Func<Scope, T>
decoratee factory with a container-lessScope
throwsNullReferenceException
.
Simple Injector v4.5.1
Release Notes
Simple Injector can be downloaded using NuGet.
Improvements
Simple Injector core library
- #678 Container controlled collections now support
Contains
andIndexOf
.
Simple Injector v4.5
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 singletonScope
. - The introduction of an
Options.ResolveUnregisteredConcreteTypes
switch that allows disabling resolving unregistered concrete types. Users are advised to change the setting tofalse
. This prevents surprises in the future, as we are changing the default behavior tofalse
in v5.0. - The addition of integration for ASP.NET Core 2.0 Razor Pages. The
SimpleInjector.Integration.AspNetCore.Mvc
package contains a newSimpleInjectorPageModelActivatorProvider
class that can be added to ASP.NET'sIServiceCollection
and acontainer.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 theContainer.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-globalScope
, 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
andCollection.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 sameScope
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
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 singletonScope
. - 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 theContainer.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-globalScope
, 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
andCollection.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 acontainer.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 sameScope
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
Release Notes
Simple Injector can be downloaded using NuGet.
Improvements
Simple Injector core library
- Several exception messages improved
Simple Injector v4.4.2
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
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>
andCollection<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>
andCollection<T>
dependencies are now supported out of the box. Any collection, registered usingCollection.Register
can now be injected and resolved as either aList<T>
orCollection<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 acceptsIServiceProvider
.
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 throughCollection.Register
andCollection.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.