see also Which C#/.NET Dependency Injection frameworks are worth looking into?
There are now many dependency injection frameworks to
FYI, just this morning I came across an interesting comparison between all the .NET IoC containers here:
http://elegantcode.com/2009/01/07/ioc-libraries-compared/
A handful of questions:
On a personal note:
I've used StructureMap for the same reasons mentioned in the blog I linked. I think XML config is a giant pain to maintain and, especially, debug (see WCF). I haven't tried Ninject yet, but based on their marketing, it must be super rad!
I think the choice comes down to finding a framework that meets your requirements and then personal preference.
Does your project already use a library such as rhino-tools that already integrates with a DI framework? If it does, that might be a good starting point if you want to avoid using "lots of different dependency injection frameworks".
Check out these two posts:
Spring and Unity are Xml heavy.
I would disagree with that statement for Unity; you can write
container.RegisterType<IRobot, MrRoboto>();
and do your setup in code using a fluent-style interface. Personally I like Unity.
It's hard to answer which framework is 'best', but I can tell you which framework is the easiest: The Simple Injector:
The Simple Injector is an easy-to-use Inversion of Control library for .NET and Silverlight. It solely supports code-based configuration and is an ideal starting point for developers unfamiliar with larger IoC / DI libraries
http://simpleinjector.codeplex.com/
Shameless plug btw ;-)