C# IoC

Open-source C# projects categorized as IoC

Top 23 C# IoC Projects

  • Autofac

    An addictive .NET IoC container

    Project mention: "7D Mad Rogue Kart" post-mortem | reddit.com/r/roguelikedev | 2023-03-12

    For the first shot, I wanted to manually web the systems together. For the next iteration, I might go with an IoC framework like Autofac.

  • Scrutor

    Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection

    Project mention: Migrating to .Net Core MVC from .Net framework 4.8 | reddit.com/r/dotnet | 2023-01-24

    if you are heavily invested in autofac you can replace the build in DI with another container. at this point i don't think it is that necessary. especially if you use scrutor. it gives your some nice assembly scanning registration that autofac/simple injector give https://github.com/khellang/Scrutor

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • Ninject

    the ninja of .net dependency injectors

    Project mention: Is it possible to use both Ninject and Microsoft Dependency injection in a app? | reddit.com/r/csharp | 2022-11-14

    Yes, you can. We use SimpleInjector + our own container abstractions in conjunction with MS one. Also consider reading this - https://github.com/ninject/Ninject/issues/278

  • Castle Windsor

    Castle Windsor is a best of breed, mature Inversion of Control container available for .NET

  • Simple Injector

    An easy, flexible, and fast Dependency Injection library that promotes best practice to steer developers towards the pit of success.

  • splat

    Makes things cross-platform

    Project mention: Using MVVM in Flutter (2022) | dev.to | 2022-09-03

    This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used instead of InheritedWidget or Provider to access objects e.g. from your UI.

  • StructureMap

    A Dependency Injection/Inversion of Control tool for .NET

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • DryIoc

    DryIoc is fast, small, full-featured IoC Container for .NET

    Project mention: Announcing .NET 8 Preview 1 | reddit.com/r/dotnet | 2023-02-21

    I'd like to keep the convention-based assembly scanning capabilities if ever that was possible. It's too convenient and less error prone than manually registering everything through attributes like current source generator strategies go. DryIocZero supports this somewhat using t4 templates, it gives you a method where you can register your stuff and do assembly scanning and it'll generate your container from there. It works and is quite small and fast but the UX does need some work since t4 is rather clunky to write on.

  • IocPerformance

    Performance comparison of .NET IoC containers

  • TinyIoC

    An easy to use, hassle free, Inversion of Control Container for small projects, libraries and beginners alike.

  • stronginject

    compile time dependency injection for .NET

    Project mention: What is the most cursed data structure you can think of? | reddit.com/r/ProgrammerHumor | 2023-01-01
  • LightInject

    An ultra lightweight IoC container

  • Jot

    Jot is a library for persisting and applying .NET application state. (by anakic)

  • Lamar

    Fast Inversion of Control Tool and Successor to StructureMap (by JasperFx)

  • VS MEF

    Managed Extensibility Framework (MEF) implementation used by Visual Studio

    Project mention: .NET Core plugin system | reddit.com/r/csharp | 2022-10-01

    This is good info! I had not heard of MEF being split up like this. Looks like there's a full explanation of everything here: https://github.com/microsoft/vs-mef/blob/main/doc/mef_library_differences.md

  • Reflex

    Minimal dependency injection framework for Unity (by gustavopsantos)

    Project mention: Reflex now supports SceneContext | reddit.com/r/Unity3D | 2022-08-29

    Enjoy! https://github.com/gustavopsantos/Reflex

  • Meet Grace

    Grace is a feature rich dependency injection container library (by ipjohnson)

  • Pure.DI

    Pure DI for .NET without frameworks!

  • Stashbox

    A lightweight, fast, and portable dependency injection framework for .NET-based solutions.

  • di-framework

    ↗ A Dependency Injection framework for Unity game engine.

  • ZeroIoC

    ZeroIoC is reflectionless IoC Container for C#

  • Simplify.DI

    Simplify is an open-source set of .NET libraries that provide infrastructure for your applications. DI and mocking friendly. (by SimplifyNet)

  • Canister

    Canister acts as a wrapper for other IoC containers giving a unified interface and does automatic type discovery within your code. By default it uses the IoC container built into .Net Core.

    Project mention: Would you use an attribute that registers your interface/classes with .nets IoC container? | reddit.com/r/dotnet | 2022-07-03

    Back before .net had a default IoC container, I built this functionality in my own container. I built it so modules could automatically wire themselves up. Just add the library and go. Now that there is a default, it lives on as an extension method/set of classes to give the same functionality. It just extends the ServiceCollection now.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-03-12.

C# IoC related posts

Index

What are some of the best open-source IoC projects in C#? This list will help you:

Project Stars
1 Autofac 4,105
2 Scrutor 2,862
3 Ninject 2,600
4 Castle Windsor 1,463
5 Simple Injector 1,123
6 splat 908
7 StructureMap 901
8 DryIoc 827
9 IocPerformance 826
10 TinyIoC 813
11 stronginject 781
12 LightInject 570
13 Jot 563
14 Lamar 482
15 VS MEF 353
16 Reflex 325
17 Meet Grace 315
18 Pure.DI 192
19 Stashbox 119
20 di-framework 31
21 ZeroIoC 28
22 Simplify.DI 17
23 Canister 5
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com