Unity 5.0.0

Unity Container Library as single package

There is a newer version of this package available.
See the version list below for details.
Install-Package Unity -Version 5.0.0
dotnet add package Unity --version 5.0.0
<PackageReference Include="Unity" Version="5.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
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

  • 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 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.

Showing the top 10 GitHub repositories that depend on Unity:

Repository Stars
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
Radarr/Radarr
A fork of Sonarr to work with movies à la Couchpotato.
MichaCo/CacheManager
CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
jakubgarfield/Bonobo-Git-Server
Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
XLabs/Xamarin-Forms-Labs
Xamarin Forms Labs is a open source project that aims to provide a powerful and cross platform set of controls and helpers tailored to work with Xamarin Forms.
Windows-XAML/Template10
Making Windows 10 apps great again
lidarr/Lidarr
Looks and smells like Sonarr but made for music.
microsoftarchive/cqrs-journey
Microsoft patterns & pratices CQRS Journey sample application
OpenCover/opencover
A code coverage tool for .NET 2 and above (WINDOWS OS only), support for 32 and 64 processes with both branch and sequence points

Version History

Version Downloads Last updated
5.11.1 82,421 6/20/2019
5.10.3 171,791 4/4/2019
5.10.2 46,765 3/23/2019
5.10.1 19,056 3/19/2019
5.10.0 6,884 3/18/2019
5.9.8 8,350 3/17/2019
5.9.7 67,336 3/4/2019
5.9.6 4,548 3/2/2019
5.9.5 53,460 2/18/2019
5.9.4 24,239 2/9/2019
5.9.3 159,379 1/30/2019
5.9.2 31,753 1/25/2019
5.9.1 4,398 1/24/2019
5.9.0 15,046 1/23/2019
5.9.0-RC1 2,810 1/21/2019
5.9.0-RC 2,139 1/14/2019
5.8.13 240,476 12/7/2018
5.8.12 43,331 12/4/2018
5.8.11 651,897 9/1/2018
5.8.10 57,146 8/27/2018
5.8.9 10,770 8/25/2018
5.8.8 2,950 8/24/2018
5.8.7 24,651 8/22/2018
5.8.6 847,750 4/19/2018
5.8.5 73,533 4/6/2018
5.8.4 35,225 3/31/2018
5.8.3 3,906 3/30/2018
5.8.2 2,204 3/30/2018
5.8.1 18,339 3/28/2018
5.8.0 25,479 3/27/2018
5.7.3 204,046 3/3/2018
5.7.2 8,162 3/3/2018
5.7.1 9,430 3/2/2018
5.7.0 13,836 3/1/2018
5.6.1 113,270 2/22/2018
5.6.0 97,740 2/13/2018
5.5.8 30,851 2/9/2018
5.5.6 137,147 1/23/2018
5.5.5 183,910 1/11/2018
5.5.4 60,362 1/3/2018
5.5.3 6,381 1/3/2018
5.5.2 9,362 12/30/2017
5.5.1 6,014 12/30/2017
5.5.0 52,161 12/20/2017
5.4.0 21,652 12/18/2017
5.3.2 138,169 12/2/2017
5.3.1 169,116 11/21/2017
5.3.0 28,156 11/19/2017
5.2.1 56,136 11/15/2017
5.2.0 244,579 11/12/2017
5.1.2 73,424 10/30/2017
5.1.0 12,990 10/29/2017
5.0.2 19,196 10/25/2017
5.0.1 25,151 10/23/2017
5.0.0 31,940 10/19/2017
4.0.1 7,353,870 10/6/2015
3.5.1405-prerelease 108,796 5/15/2014
3.5.1404 3,530,061 4/22/2014
3.0.1304.1 1,037,416 8/29/2013
3.0.1304 296,433 4/26/2013
3.0.1208-Preview 11,469 8/10/2012
2.1.505.2 1,561,188 8/2/2012
2.1.505 1,370,193 5/11/2011
2.0.0 291,211 5/5/2011
1.0.0-beta 994 12/2/2015
Show less