views:

538

answers:

9

Currently there are quite a few DI/IoC-frameworks for .NET out there (http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx). I find it quite hard to choose. Therefore I wanted to measure the public opinion and see which framework is the most popular - so please post your favorite framework here and let the people vote...

A: 

Use Windsor or Unity, and decide based on a POC

Unity is not so bloated up so far, you could go with that based on your project type - especially if you are using unity dependent frameworks like CompositeWPF

See another thread on SO about the same, http://stackoverflow.com/questions/411660/enterprise-library-unity-vs-other-ioc-containers/552237

amazedsaint
I'd just add that Composite WPF is not dependent on unity - all unity support is provided by a UnityExtensions module which you don't have to reference. You can (and I do) use Castle or another container.
Paul Stovell
A: 

Structuremap

Paco
+2  A: 

I'm currently using Castle.Windsor. Mainly because of the integration it has with the Rhino Tools library.

Scott Muc
+1  A: 

I've been watching Kzu (creator of Moq)'s screencast series as he develops Funq - a DI framework that makes extensive use of lambdas the same way Moq does. No release yet but I'm looking forward to trying it out.

Matt Hamilton
That looks interesting, thanks.
suhair
+1  A: 

StructureMap

I love the fact that I can configure it all using the fluent interface (aka Configuration DSL). Typesafe configuration is a must when I do refactoring.

BjartN
A: 

Autofac. Type-safe and plays well with code-refactoring. Apart from the boiler-plate stuff, I found the delegate factories to be very useful.

Nick Gunn
+1  A: 

Unity It's simple and unintrusive, yet type-safe. And it is created by Microsoft Pattern & Pratices group.

toxvaerd
Judging by http://unity.codeplex.com/SourceControl/PatchList.aspx, they do not accept any community contributions.
Yurik
A: 

+1 vote to Unity

boj
A: 

+1 Castle Windsor

Tiendq