For a dependency injection library for C#, the first results are autofac/autofac (Autofac is a comprehensive and high-performance dependency injection container for ), ninject/ninject (Ninject is a long-standing dependency injection framework for ) and unitycontainer/unity (Unity is a long-standing dependency injection container for ). simpleinjector/simpleinjector and khellang/scrutor round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best c sharp dependency injection libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Autofac is a dependency injection framework and inversion of control container for .NET. It functions as a component registration engine that decouples class implementations from their dependencies by injecting required services via constructors or properties. The project includes an assembly scanning library to automatically discover and register components within compiled binaries based on specific type criteria. It provides a service lifetime manager to control object memory duration using singletons, instance-per-dependency, or isolated request scopes. The framework covers a broad range
Autofac is a comprehensive and high-performance dependency injection container for .NET that natively supports constructor injection, advanced service lifetime management, and assembly scanning, while maintaining full compatibility with the Microsoft.Extensions.DependencyInjection abstraction.
the ninja of .net dependency injectors
Ninject is a long-standing dependency injection framework for .NET that supports constructor injection and service lifetime management, though it predates the modern Microsoft.Extensions.DependencyInjection abstraction and is less optimized for current high-performance requirements.
This repository contains all relevant information about Unity Container suit
Unity is a long-standing dependency injection container for .NET that supports constructor injection and service lifetime management, though it is a legacy framework that predates the modern Microsoft.Extensions.DependencyInjection abstraction.
Simple Injector is a high-performance dependency injection container for .NET that supports constructor injection and service lifetime management, though it intentionally avoids full compatibility with Microsoft.Extensions.DependencyInjection to maintain its own design philosophy.
Scrutor is a library that extends the standard Microsoft dependency injection container. It provides tools for automated type discovery, complex registration orchestration, and service decoration capabilities within the .NET ecosystem. The project enables the automatic discovery and registration of types from assemblies based on interfaces or attributes. It also provides a framework for wrapping existing services with decorator classes to add functionality without modifying the original source code. The library covers broad capability areas including assembly scanning workflows, dependency i
This library is a set of extensions for the standard Microsoft dependency injection container rather than a standalone container itself, making it a tool you would use alongside an existing implementation.
This project provides a standardized architectural framework for building scalable, full-stack enterprise applications. It serves as a foundational boilerplate that enforces clean architecture principles, ensuring that business logic remains isolated from infrastructure concerns and external data persistence details. By organizing code into feature-based modules rather than technical roles, the framework simplifies navigation and maintenance within large, complex codebases. The architecture distinguishes itself through a mediator-based communication model that decouples application layers and
This repository is a comprehensive boilerplate and architectural framework for building enterprise applications rather than a standalone dependency injection container library.
MvvmCross is a .NET MVVM framework designed for building cross-platform applications by separating business logic from native user interfaces. It functions as a navigation engine and a UI data binding library, enabling the encapsulation of logic within view models that are reused across different operating systems. The framework provides a native hardware abstraction layer and a dependency injection container to decouple components and provide a consistent interface for accessing device features. It coordinates type-safe transitions between native screens and manages the synchronization of da
MvvmCross is a comprehensive cross-platform MVVM framework that includes a dependency injection container as a supporting utility, rather than being a standalone, high-performance DI container library for general .NET use.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| autofac/autofac | 4.6K | C# | MIT | |
| ninject/ninject | 2.7K | C# | NOASSERTION | |
| unitycontainer/unity |
| 1.7K |
| — |
| Apache-2.0 |
| simpleinjector/simpleinjector | 1.3K | C# | mit |
| khellang/scrutor | 4.3K | C# | MIT |
| rafaelfgx/architecture | 3.3K | C# | MIT |
| mvvmcross/mvvmcross | 3.9K | C# | MS-PL |