C# Dependency Injection

Open-source C# projects categorized as Dependency Injection
Topics: IoC C# Unity C# .NET

Top 23 C# Dependency Injection Projects

  • Autofac

    An addictive .NET IoC container

  • Project mention: Modular Dependency Injection in .NET | dev.to | 2024-03-25

    When I was building application with .NET Framework I always used libraries like Autofac and SimpleInjector for dependency injection. I really liked to create modules (Packages in SimpleInjector) to achieve higher cohesion and lower coupling in my class libraries. I made a module for every class library in which all dependencies inside of that class library were registered. Why should my web application (for example) know if MyBeautifulService in MyBeautifulClassLibrary should be transient or singleton?

  • Scrutor

    Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection

  • Project mention: Reflection -> Source Generated | /r/dotnet | 2023-06-03
  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • VContainer

    The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.

  • Project mention: VContainer VS Init(args) Lite - a user suggested alternative | libhunt.com/r/VContainer | 2024-05-05
  • Simple Injector

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

  • Project mention: Modular Dependency Injection in .NET | dev.to | 2024-03-25

    When I was building application with .NET Framework I always used libraries like Autofac and SimpleInjector for dependency injection. I really liked to create modules (Packages in SimpleInjector) to achieve higher cohesion and lower coupling in my class libraries. I made a module for every class library in which all dependencies inside of that class library were registered. Why should my web application (for example) know if MyBeautifulService in MyBeautifulClassLibrary should be transient or singleton?

  • jab

    C# Source Generator based dependency injection container implementation.

  • DryIoc

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

  • Device.Net

    A C# cross platform connected device framework

  • SaaSHub

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

    SaaSHub logo
  • Reflex

    Minimal dependency injection framework for Unity (by gustavopsantos)

  • Project mention: Another small hack I use for prototyping | /r/Unity3D | 2023-12-10

    There is also Reflex, a fast but more minimalistic solution. I haven't really heard much about people's experiences using this, so not sure how good it is in practice.

  • Extenject

    Dependency Injection Framework for Unity Game Engine (by Mathijs-Bakker)

  • Project mention: I've been a Unity Dev for over 10 years. I recently joined this project that has some seasoned Unity vets but the player object looks like this. I know it mostly comes down to design patterns / choices, but does this seems like an excessive amount of components on one object? | /r/Unity3D | 2023-05-25

    I use Extenject in all my projects which is a bliss for these issues.

  • Pure.DI

    Pure DI for .NET without frameworks!

  • Meet Grace

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

  • Prism.Avalonia

    Prism framework support for Avalonia UI

  • Project mention: How good is MAUI? | /r/csharp | 2023-05-13

    In terms of Prism, you can find a community fork of Prism. .

  • FluentValidation.Blazor

    Fluent Validation-powered Blazor component for validating standard <EditForm> :milky_way: :white_check_mark:

  • Autofac.Extensions.DependencyInjection

    Autofac implementation of the interfaces in Microsoft.Extensions.DependencyInjection.Abstractions, the .NET Core dependency injection abstraction.

  • Stashbox

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

  • Maui.Plugins.PageResolver

    A simple and lightweight page resolver for use in .NET MAUI projects

  • xaml-code-experiences

    A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.

  • Medicine

    Code-driven component injection toolkit for Unity.

  • MailKitSimplified

    Send and receive emails easily, fluently, with one line of code for each operation.

  • di-framework

    ↗ A Dependency Injection framework for Unity game engine.

  • xunit-dependency-injection

    :fire: A small library to help .NET developers leverage Microsoft's dependency injection framework in their Xunit-powered test projects

  • Simplify.DI

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

  • SaveGame

    Keep track of your video games!

  • Project mention: Show HN: Yet another video game tracker app | news.ycombinator.com | 2024-01-11
  • SaaSHub

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

    SaaSHub logo
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).

C# Dependency Injection related posts

  • VContainer VS Init(args) Lite - a user suggested alternative

    2 projects | 5 May 2024
  • Zenject VS Init(args) Lite - a user suggested alternative

    2 projects | 5 May 2024
  • Modular Dependency Injection in .NET

    2 projects | dev.to | 25 Mar 2024
  • Another small hack I use for prototyping

    1 project | /r/Unity3D | 10 Dec 2023
  • Unity game architecture Part 1

    1 project | dev.to | 25 Sep 2023
  • I've been a Unity Dev for over 10 years. I recently joined this project that has some seasoned Unity vets but the player object looks like this. I know it mostly comes down to design patterns / choices, but does this seems like an excessive amount of components on one object?

    2 projects | /r/Unity3D | 25 May 2023
  • Singleton vs Dependency Injection vs Service Locator vs Scriptable Objects

    5 projects | /r/Unity3D | 22 May 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 9 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

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

Project Stars
1 Autofac 4,386
2 Scrutor 3,438
3 VContainer 1,691
4 Simple Injector 1,184
5 jab 1,008
6 DryIoc 966
7 Device.Net 597
8 Reflex 590
9 Extenject 472
10 Pure.DI 387
11 Meet Grace 334
12 Prism.Avalonia 262
13 FluentValidation.Blazor 233
14 Autofac.Extensions.DependencyInjection 187
15 Stashbox 134
16 Maui.Plugins.PageResolver 118
17 xaml-code-experiences 117
18 Medicine 83
19 MailKitSimplified 53
20 di-framework 38
21 xunit-dependency-injection 37
22 Simplify.DI 18
23 SaveGame 16

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com