All Versions
27
Latest Version
Avg Release Cycle
31 days
Latest Release
613 days ago

Changelog History
Page 2

  • v4.9.1 Changes

    March 06, 2020

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸ› Bug fixes

    Simple Injector core library

    • #414 Object graphs that consist of decorators with Func<T> decoratee factories are now visualized correctly.
    • #759 Object graphs that consist collections (e.g. IEnumerable<T>) are now visualized correctly.

    πŸ“¦ ASP.NET Core Integration packages

    • πŸ‘» #802 Exception message improved that is thrown by the SimpleInjectorControllerActivator in case an unregistered controller is requested.
  • v4.9 Changes

    January 06, 2020

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸš€ The most prominent improvements in this release are:

    • Core library:
      • Support for using ReadOnlyCollection<T> in the core library.
      • The container's Lifestyle Mismatch verification behavior can now be set to a less strict model allowing Transient dependencies to be injected into Scoped consumers using the Container.Options.UseLoosenedLifestyleMismatchBehavior configuration switch.
    • ASP.NET Core integration:
      • The container is now automatically disposed on web application shutdown, unless overridden using services.AddSimpleInjector(container, options => { options.DisposeContainerWithServiceProvider = false; }).
      • Scoped IAsyncDisposable components, created by Simple Injector during the course of a web request, will now be automatically, and asynchronously disposed.

    πŸ‘Œ Improvements

    Simple Injector core library

    • πŸ‘ #762 Support for resolving and injecting ReadOnlyCollection<T> collections added
    • #781 Reports existing interface registrations when Options.ResolveUnregisteredConcreteTypes is false
    • πŸ’… #793 Added option to loosen the Lifestyle Mismatch verification behavior.

    πŸ“¦ ServiceCollection Integration package

    • #787 The Container instance is now automatically appended to the IServiceCollection to simplify some integration scenarios.

    πŸ“¦ ASP.NET Core Integration packages

    • #763 Allow Simple Injector container to be automatically disposed when integrated into ASP.NET Core
    • πŸ“¦ #778 Added support for IAsyncDisposable. The ASP.NET Core integration package will now automatically do asynchronous disposal of scoped IAsyncDisposable dependencies within the context of a web request.
    • πŸ›  #730 Fixed an invalid message in an ObsoleteAttribute
    • #794 Some obsoleted messages are now marked with error: true and now cause compile errors.

    The following class members are now marked obsolete:

    • SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcControllers(Container, IApplicationBuilder)
    • SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcViewComponents(Container, IApplicationBuilder)
    • SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterMvcViewComponents(Container, IViewComponentDescriptorProvider)
    • SimpleInjectorAspNetCoreMvcIntegrationExtensions.AddSimpleInjectorTagHelperActivation
    • SimpleInjectorAspNetCoreMvcIntegrationExtensions.RegisterPageModels
    • SimpleInjectorAspNetIntegrationExtensions.EnableSimpleInjectorCrossWiring(IServiceCollection, Container)
    • SimpleInjectorAspNetIntegrationExtensions.CrossWire<TService>(Container, IApplicationBuilder)
    • SimpleInjectorAspNetIntegrationExtensions.CrossWire(Container, Type, IApplicationBuilder)
    • SimpleInjectorAspNetIntegrationExtensions.AutoCrossWireAspNetComponents(Container, IApplicationBuilder)
    • SimpleInjectorAspNetIntegrationExtensions.AutoCrossWireAspNetComponents(Container, IServiceProvider)
    • SimpleInjectorUseOptionsAspNetCoreExtensions.UseMiddleware<TMiddleware>(SimpleInjectorUseOptions, IApplicationBuilder)
    • SimpleInjectorUseOptionsAspNetCoreExtensions. UseMiddleware(SimpleInjectorUseOptions, Type, IApplicationBuilder)
  • v4.8.1 Changes

    November 30, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸ› Bug fixes

    Simple Injector core library

    • πŸ’… #755 Improved a confusing Lifestyle Mismatch warning that went of when injecting a List<T> or array a Singleton.
    • πŸ’… #769 Fixed a false-positive Torn Lifestyle warning when using the forwarded collection registrations.
  • v4.8 Changes

    November 24, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸš€ The most prominent improvements in this release are:

    • πŸ‘ Full support for ASP.NET Core 3.
    • The container can now perform verification on first resolve. This can be enabled using an option switch.
    • The container now allows sending notifications to inform that the container is about to be locked.
    • πŸ›  Several small improvements and bug fixes.

    πŸš€ For the last few years, the development of ASP.NET Core has been in flux. We've seen breaking changes from release to release and we engaged in discussions with Microsoft about all kinds of issues and bugs that we came across. The introduction of ASP.NET Core v3 again caused some issues with Simple Injector. Those problems took us more time to analyze, discuss, design, test, document, and release.

    πŸ“š Finally, in this release we now truly support ASP.NET Core 3. To pull this off, we had to mark quite a few methods as obsolete and replace them with new methods. For the most part, you can follow the compiler-generated obsolete messages that you get once you upgrade to v4.8. Or refer to the documentation, if freshly apply Simple Injector to an ASP.NET Core application.

    ⬆️ > Note that the v4.8 integration libraries can be used in ASP.NET Core v2 as well, and we advise ASP.NET Core v2 users to upgrade to Simple Injector v4.8 as well, because of the bug fixes we made, and to make it easier later on to migrate to ASP.NET Core v3.

    πŸš€ The Container can now perform verification on first resolve. We found that many developers that are new to Simple Injector don't realize that Simple Injector allows verifying the configuration. To mitigate this, v5.0 will automatically verify the container for you when you resolve your first component, in case you, or one of your team members, forgot to call Container.Verify(). In this v4.8 release we add this feature, but leave it disabled by default to prevent any breaking changes. In v5 we will turn the switch. You can enable it by setting Container.Options.EnableAutoVerification to true or you can already set it to false to prevent verification in case you have your own safety net in place (e.g. by calling container.Verify() inside a unit test).

    πŸ“¦ We added a new event that you can subscribe and receive a notification when the container is about to get lockedβ€”this would typically happen when the first component gets resolved. This enables making last-minute registrations and allows spotting who is locking the container. The ASP.NET Core integration package is now the primary consumer of this eventβ€”it needs this notification to successfully integrate with ASP.NET Core v3.

    πŸ‘Œ Improvements

    Simple Injector core library

    • 0️⃣ #555 Allowed performing verification upon first resolve. This feature can be enabled by setting Container.Options.EnableAutoVerification = true;. The value is false by default, but this will change in v5.
    • 🚦 #767 Added the Container.ContainerLocking event that signals when the container is about to get locked.
    • πŸ‘» #441 Resolving an unregistered collection now throws an exception with a message that explains that collections need to be registered explicitly and how to solve the issue.

    πŸ“¦ ServiceCollection Integration package

    • πŸ‘ #754 Added ASP.NET Core 3 support. To support ASP.NET Core 3, the following methods are added:
      • SimpleInjectorAddOptions.AutoCrossWireFrameworkComponents property. Can be used from within the AddSimpleInjector setup action.
      • New CrossWire() extension methods on top of SimpleInjectorAddOptions. They replace the CrossWire extension methods on top of SimpleInjectorUseOptions.
      • New AddLogging() and AddLocalization() extension methods on top of SimpleInjectorAddOptions. They replace the UseLogging() and UseLocalization() extension methods on top of SimpleInjectorUseOptions.

    The following class members are now marked obsolete:

    SimpleInjectorServiceCollectionExtensions:

    • UseLogging(SimpleInjectorUseOptions). You can call AddLogging(SimpleInjectorAddOptions) instead as part of the AddSimpleInjector setup action.
    • UseLocalization(SimpleInjectorUseOptions). You can call AddLocalization(SimpleInjectorAddOptions) instead as part of the AddSimpleInjector setup action.
    • CrossWire<TService>(SimpleInjectorUseOptions). You can call CrossWire<TService>(SimpleInjectorAddOptions) instead as part of the AddSimpleInjector setup action.

    - CrossWire(SimpleInjectorUseOptions, Type). You can call CrossWire(SimpleInjectorAddOptions, Type) instead as part of the AddSimpleInjector setup action.

    SimpleInjectorUseOptions:

    • AutoCrossWireFrameworkComponents. Setting it has no effect any longer and using it will therefore cause a compile error. You can use SimpleInjectorAddOptions.AutoCrossWireFrameworkComponents instead as part of the AddSimpleInjector setup action.

    πŸ“¦ ASP.NET Generic Host Integration package

    • #754 Enabled hosted services to be integrated with Simple Injector and ASP.NET Core 3.

    πŸ“¦ ASP.NET Core Integration packages

    • πŸ‘ #754 Added ASP.NET Core 3 support.

    The following class members are now marked obsolete:

    • SimpleInjectorAspNetIntegrationExtensions:
      • EnableSimpleInjectorCrossWiring(). A call to .AddSimpleInjector() automatically enables cross wiring.
      • CrossWire<TService>(Container, IApplicationBuilder). Instead of calling CrossWire on the Container, you can now call CrossWire on SimpleInjectorAddOptions.
      • CrossWire(this Container, Type, IApplicationBuilder). Instead of calling CrossWire on the Container, you can now call CrossWire on SimpleInjectorAddOptions.
      • AutoCrossWireAspNetComponents(Container, IApplicationBuilder). Auto cross wiring is automatically enabled when calling .AddSimpleInjector().
      • AutoCrossWireAspNetComponents(Container, IServiceProvider). Auto cross wiring is automatically enabled when calling .AddSimpleInjector().
    • SimpleInjectorUseOptionsAspNetCoreExtensions:
      • UseMiddleware<TMiddleware>(SimpleInjectorUseOptions, IApplicationBuilder). This method can cause your middleware to be applied at the wrong stage in the pipeline. This will, for instance, cause your middleware to be executed before the static files middleware (i.e. the .UseStaticFiles() call) or before authorization is applied (i.e. the .UseAuthorization() call). Instead call app.UseMiddleware<TMiddleware>(Container), and make sure you call it at the right stage. This typically means after .UseStaticFiles() and .UseAuthorization(), but before .UseEndpoints(...).
      • UseMiddleware(SimpleInjectorUseOptions, Type, IApplicationBuilder). Same as previous. Call app.UseMiddleware(Container, Type) instead.

    πŸ› Bug fixes

    πŸ“¦ ServiceCollection Integration package

    • πŸ‘» #713 Resolving cross-wired transient service outside of scope threw a too generic exception.

    πŸ“¦ ASP.NET Core Integration packages

    • #750 Prevented TagHelper classes with __Generated__ in their name to be resolved from Simple Injector.
    • πŸ’… #761 AddTagHelperActivation incorrectly uses DefaultScopedLifestyle for tag helpers instead of Lifestyle.Transient.
  • v4.7.2 Changes

    September 19, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸš€ This is a patch release that fixes a bug that prevented the ASP.NET Core MVC integration package to be used in combination with ASP.NET Core v3 (#748).

  • v4.7.1 Changes

    September 02, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸš€ This is a patch release that fixes a regression in the MVC integration package (#746).

  • v4.7 Changes

    September 01, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸš€ The most prominent improvements in this release are:

    • πŸ“¦ #649 Implemented C# 8.0 non-nullable support. This affects the core library and all integration packages. The complete API is now annotated in such way that C# 8 can warn you want you are possible using a null reference.
    • Simplify integration with IStringLocalizer and IStringLocalizer<T> while integrating with .NET Core. Thanks to contributor @kwlin for implementing this.

    πŸ‘Œ Improvements

    Simple Injector core library

    • πŸ‘ #649 Implemented C# 8 non-nullable support
    • #736 Marked [Obsolete] message as error
    • #727 Added GetService method to Scope by implementing IServiceProvider.
      Usage:

      Scope scope = ...;IServiceProvider provider = scope;object? service = provider.GetService(typeof(SomeType));

    πŸ“¦ ASP.NET Core Integration packages

    • #717 Added non-generic options.UseMiddleware overload.

    πŸ“¦ ServiceCollection Integration packages

    #718 Simplify integration with IStringLocalizer and IStringLocalizer<T> by adding an UseLocalization() extension method. Implemented by @kwlin.
    Usage:

    app.UseSimpleInjector(container, options =\>{ options.UseLocalization(); });
    
  • v4.6.2 Changes

    July 27, 2019

    πŸš€ Release Notes

    πŸ“¦ Simple Injector can be downloaded using NuGet.

    πŸ‘Œ Improvements

    Simple Injector core library

    • #731 ThreadAbortExceptions could cause the Container's internal state to get corrupt.
    • #732 Diagnostic Analyzers did not respect container.Options.UseFullyQualifiedTypeNames
    • πŸ‘» #719 Improved "The supplied list of types contains one or multiple open-generic types, but this method is unable to handle open-generic types" exception message
    • πŸ“š #720 Improved XML documentation on Container.Collection.Append overloads.
  • v4.6.1 Changes

    July 23, 2019

    πŸš€ 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.
  • v4.6 Changes

    May 11, 2019

    πŸš€ 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.
    • 0️⃣ #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.