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 aTypeFactoryContextinstance whoseConsumerproperty 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 aTypeFactoryContextinstance whoseConsumerproperty 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
ExpressionBuiltEventArgsctor marked obsolete. - #701
SimpleInjector.Scopedefault 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.Objectmethods (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.Equalscan throw aNullReferenceException. - #695
Container.GetRegistrationandContainer.GetServicemethods lack null check. - #696
InjectionTargetInfo.Equalscan throw aNullReferenceException. - #702 Improve error reporting when resolving
Scopeinstances when there is no active scope. - #703 Applying proxy or
Scopeddecorators using 'decorator-type factory' fails withNullReferenceExceptionon uncontrolled collections. - #704 Supplying an injected
Func<Scope, T>decoratee factory with a container-lessScopethrowsNullReferenceException.
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
ContainsandIndexOf.
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.ContainerScopeproperty that allows access to the singletonScope. - The introduction of an
Options.ResolveUnregisteredConcreteTypesswitch 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 tofalsein v5.0. - The addition of integration for ASP.NET Core 2.0 Razor Pages. The
SimpleInjector.Integration.AspNetCore.Mvcpackage contains a newSimpleInjectorPageModelActivatorProviderclass that can be added to ASP.NET'sIServiceCollectionand 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.IsVerifyingproperty instead.
Features and improvements
Simple Injector core library
- #377
Container.Options.ResolveUnregisteredConcreteTypesswitch 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.ContainerScopeproperty 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.AppendandCollection.AppendInstanceoverloads 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
WebRequestLifestylefrom reusing the sameScopeinstance 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
ContainerScopethat 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.IsVerifyingproperty 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.ContainerScopeproperty 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.AppendandCollection.AppendInstanceoverloads 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
SimpleInjectorPageModelActivatorProviderthat 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
WebRequestLifestylefrom reusing the sameScopeinstance 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.Registercan 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
AutoCrossWireAspNetComponentsoverload 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
Registrationinstances throughCollection.RegisterandCollection.Appendfailed.
Simple Injector Web API integration package
- #628 Use of
EnableHttpRequestMessageTrackingunder .NET <= 4.6.x could cause a memory leak.
Simple Injector ASP.NET Core integration
- #588
SimpleInjectorControllerActivatorwill not resolve unregistered controllers from ASP.NET Core anymore.