Unity 5.0.0

Unity Library

Unity Container Library as single package

Install-Package Unity -Version 5.0.0
dotnet add package Unity --version 5.0.0
paket add Unity --version 5.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release 5.0.0

After few years of inactivity we are finally updating Unity library. The main goal of this release was to preserve compatibility with previous distribution v4.0.1 as much as possible. Unfortunately loss of original signing key prevented creation of compatible assemblies. To eliminate conflicts assembly names and namespaces were changed. The Unity Container has been split into following assemblies:

  • Unity.Abstractions.2.0.0
  • Unity.Container.5.0.0
  • Unity.ServiceLocation.2.0.0
  • CommonServiceLocator.2.0.1 Each of these is available as individual package but Abstractions and Container also distributed as library via Unity.5.0.0 package. All 1220 tests from previous release are still passing.

New features

Release 5.0.0

After few years of inactivity we are finally updating Unity library. The main goal of this release was to preserve compatibility with previous distribution v4.0.1 as much as possible. Unfortunately loss of original signing key prevented creation of compatible assemblies. To eliminate conflicts assembly names and namespaces were changed. The Unity Container has been split into following assemblies:

  • Unity.Abstractions.2.0.0
  • Unity.Container.5.0.0
  • Unity.ServiceLocation.2.0.0
  • CommonServiceLocator.2.0.1

Each of these is available as individual package but Abstractions and Container also distributed as library via Unity.5.0.0 package.

All 1220 tests from previous release are still passing.

New features

  • Unity container no longer references CommonServiceLocator
  • Added support for .NET 4.0, 4.5, 4.7, .NET Core 1.0+ and .NET Standard 1.0+ where available.
  • Container internally uses ConcurrentDictionary to improve multi threading
  • Added DelegateInjectionFactory which allows free form delegate to serve as Injection Factory
  • Added support for IEnumerable<T> resolution
  • Registration speed increased about one order of magnitude See data

Breaking changes

  • Unity has been split into Unity.Abstractions and Unity.Container
  • Moved ServiceLocation functionality into separate package Unity.ServiceLocation
  • Interface IBuilderContext now has reference to IUnityContainer. This change was required to speed up dependency resoluton.
  • TearDown has been removed from IUnityContainer
  • ResolveAll has been converted to Extension method

Release Notes

Entire Unity Library as single package.

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
5.0.0 (current version) 2,370 10/19/2017
4.0.1 2,725,191 10/6/2015
3.5.1405-prerelease 84,187 5/15/2014
3.5.1404 2,161,571 4/22/2014
3.0.1304.1 510,222 8/29/2013
3.0.1304 221,723 4/26/2013
3.0.1208-Preview 9,577 8/10/2012
2.1.505.2 887,649 8/2/2012
2.1.505 730,441 5/11/2011
2.0.0 149,423 5/5/2011
1.0.0-beta 248 12/2/2015