Skip to content
Implements Microsoft.Extensions.DependencyInjection.Abstraction
Branch: master
Clone or download

Latest commit

seesharper Merge pull request #128 from seesharper/dependabot/nuget/src/LightInj…

Bump LightInject from 6.3.2 to 6.3.3 in /src
Latest commit 1cabb47 May 13, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
src Bump LightInject from 6.3.2 to 6.3.3 in /src May 13, 2020
.gitignore Ignore global tool Oct 20, 2019 Added changelog Aug 30, 2016 Updated doc Feb 12, 2020


AppVeyor NuGet GitHub tag

Implements the Microsoft.Extensions.DependencyInjection.Abstractions and makes it possible to create an IServiceProvider that is 100% compatible with the Microsoft.Extensions.DependencyInjection.Specification.Tests.

Note: This package is NOT meant to be used directly with AspNetCore applications. If the target application is an AspNetCore application, use the LightInject.Microsoft.Hosting package instead.


dotnet add package LightInject.Microsoft.DependencyInjection


var services = new ServiceCollection();
var provider = services.CreateLightInjectServiceProvider();

It is also possible to create an IServiceProvider directly from an IServiceContainer instance.

var container = new ServiceContainer(Options.Default.WithMicrosoftSettings);
var provider = container.CreateServiceProvider();

Note: Make sure that the Options.Default.WithMicrosoftSettings is passed in as options when creating the container. This makes the provider compliant with the default provider from Microsoft.

You can’t perform that action at this time.