Search code examples
.netarchitecturedependency-injection

Comparison (pros/cons) of various .NET dependency injection frameworks


I am in the process of selecting a dependency injection framework for a new .NET application. There is a bewildering plethora of these frameworks out there, including Ninject, StructureMap, Unity, Castle Windsor, Spring.NET, etc., etc. I never believe that any one tool is absolutely better or worse than any other, however; it always depends on context and constraints.

With that in mind, can anyone offer some pros and cons of the various .NET dependency injection frameworks, vis-a-vis each other? Which are more suitable for small projects, large projects, etc.? For what types of projects, architectures, and development teams do each work best or not so well? Any wisdom from those who have worked with several of these frameworks would be very helpful...


Solution

  • Here is a nice performance benchmark: