I am wondering if anyone can recommend IOC framework which can work under c# 4.0? Also, does .Net framework 4.0 natively support IOC?
Asked
Active
Viewed 2,471 times
2
-
2Subjective question. Everyone will just answer with their favorite IoC. Either add specific requirements that it must support or delete the question. – jgauffin May 02 '11 at 14:23
-
Need to support .Net Framework, better can be configured using both XML and attributes – user705414 May 02 '11 at 14:28
-
All of the answers you get is for .Net. 99% of all frameworks support xml/attributes. You could have found that by googling. Those requirements are therefore not very specific. – jgauffin May 02 '11 at 14:41
-
Has been asked many times before, e.g. http://stackoverflow.com/questions/2216684/comparing-castle-windsor-unity-and-structuremap and http://stackoverflow.com/questions/148908/which-dependency-injection-tool-should-i-use – Mark Seemann May 02 '11 at 15:12
-
1IoC is "natively supported" in the sense that you don't need a framework in any language to use it. It's just a concept. You can implement your own dependency injection. – Adam Lear May 02 '11 at 16:01
2 Answers
5
Scott Hanselman has a list of .Net IOC/Dependency injection tools here:
http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx
and there are some good feature charts to be found here:
http://code.google.com/p/net-ioc-frameworks/wiki/Charts
Otherwise it's simply down to requirement & personal preference (Ninject/StructureMap in my case!)

Roja Buck
- 2,354
- 16
- 26
1
MEF can be used as an IoC and is part of the .Net 4 framework.

Tom Brothers
- 5,929
- 1
- 20
- 17
-
http://stackoverflow.com/questions/216565/why-exactly-isnt-mef-a-di-ioc-container – Phill May 02 '11 at 15:54