Welcome to GenDI Discussions! #11
schivei
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🎉 Introducing GenDI — compile-time dependency injection for .NET
Hey everyone! 👋
I'm excited to share GenDI, an open-source C# source generator that makes dependency
injection in .NET cleaner, faster, and AOT-ready — without sacrificing any of the power you
expect from Microsoft DI.
The problem it solves
Every time you add a dependency to a service, you're forced to:
For two or three dependencies that's fine. For real-world services with five, six, or more
dependencies it becomes noise — pure maintenance overhead that distracts from actual business
logic.
The GenDI way
One
[Inject]property per dependency. No fields, no constructor, no assignments. GenDIgenerates all the wiring code at compile time.
Key highlights
[Injectable], contracts with[ServiceInjection][Inject(Key = "...")]or[FromKeyedServices]requiredkeyword ensures every dependency is wiredBenchmarks
Property injection and constructor injection are within noise — so you can pick the clean
ergonomic style without any performance penalty.
Get started
Roadmap
We have a big list of ideas coming — analyzers,
[InjectOptional], decorator patternauto-wiring,
GenDI.Testing, Blazor WASM validation,dotnet newtemplates and more.Check the full roadmap.
I'd love your feedback! Have you dealt with constructor bloat in your .NET projects? What
features would make GenDI more useful for you? Drop a comment below 👇
And if you'd like to contribute or sponsor the project:
All reactions