Unity.Microsoft.DependencyInjection 1.0.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Unity.Microsoft.DependencyInjection --version 1.0.1                
NuGet\Install-Package Unity.Microsoft.DependencyInjection -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Unity.Microsoft.DependencyInjection" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Unity.Microsoft.DependencyInjection --version 1.0.1                
#r "nuget: Unity.Microsoft.DependencyInjection, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Unity.Microsoft.DependencyInjection as a Cake Addin
#addin nuget:?package=Unity.Microsoft.DependencyInjection&version=1.0.1

// Install Unity.Microsoft.DependencyInjection as a Cake Tool
#tool nuget:?package=Unity.Microsoft.DependencyInjection&version=1.0.1                

Get Started

  • Reference the Unity.Microsoft.DependencyInjection package from NuGet.
Install-Package Unity.Microsoft.DependencyInjection

First way:

  • In the WebHostBuilder add ConfigureServices(services => services.AddUnity()) method
public static IWebHost BuildWebHost(string[] args) =>
    WebHost.CreateDefaultBuilder(args)
        .ConfigureServices(services => services.AddUnity())
        .UseStartup<Startup>()
        .Build();
  • Add method to your Startup class
public void ConfigureContainer(IUnityContainer container)
{
  container.RegisterType<IMyService, MyService>();
}

Second way:

  • In the ConfigureServices method of your Startup class...
    • Register services from the IServiceCollection.
    • Build your container.
    • Call ConfigureServices extension on IUnityContainer and return it.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
  services.AddMvc();
  
  var container = new UnityContainer();
  
  container.RegisterType<IMyService, MyService>();
  
  return container.ConfigureServices(services);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 is compatible.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (18)

Showing the top 5 NuGet packages that depend on Unity.Microsoft.DependencyInjection:

Package Downloads
Microsoft.Skype.Bots.Media

The Microsoft Real-time Media Platform enables bots to interact with Skype and Microsoft Teams calls and Microsoft Teams meetings using real-time voice, video and screen sharing. This is an advanced capability which allows the bot to send and receive voice and video content frame by frame. The bot has "raw" access to the voice, video and screen sharing media streams.

IFramework.DependencyInjection.Unity

Package Description

Zero.Foundation

Package Description

Sels.Core.Unity

Uses the Unity IoC container to implement abstractions in Sels.Core. Used by projects maintained here: https://github.com/Jenssels1998

PSFiddle.Common

Package Description

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Unity.Microsoft.DependencyInjection:

Repository Stars
danielpalme/IocPerformance
Performance comparison of .NET IoC containers
Particular/docs.particular.net
All content for ParticularDocs
Version Downloads Last updated
5.11.5 3,246,922 12/12/2019
5.11.4 13,179 12/8/2019
5.11.3 13,679 12/8/2019
5.11.2 2,297 12/8/2019
5.11.1 36,583 12/6/2019
5.11.0 8,795 12/6/2019
5.10.2 497,362 4/10/2019
5.10.1 40,820 3/23/2019
5.10.0 62,080 3/18/2019
5.9.2 16,447 3/2/2019
5.9.1 13,088 2/6/2019
5.9.0 18,090 1/23/2019
2.1.3 195,153 12/9/2018
2.1.2.1 54,500 12/4/2018
2.1.1 61,315 8/29/2018
2.1.0 3,558 8/25/2018
2.0.12 1,170 8/24/2018
2.0.11 1,157 8/22/2018
2.0.10 198,137 3/27/2018
2.0.9 4,401 3/4/2018
2.0.8 1,730 3/4/2018
2.0.7 1,268 3/1/2018
2.0.6 2,577 1/29/2018
2.0.5 1,321 1/23/2018
2.0.4 1,284 1/23/2018
2.0.3 1,069 1/23/2018
2.0.2 1,383 1/11/2018
2.0.1 1,368 1/10/2018
2.0.0 1,712 1/9/2018
1.0.1 9,586 1/5/2018
1.0.0 2,779 1/4/2018

This package is distributed as .NET Standard 1.0 package. It is compatible with Microsoft.Extensions.DependencyInjection.Abstractions specification.