Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6590347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:17:16+00:00 2026-05-25T17:17:16+00:00

I’m sorry this is a very long question. I’m looking for help from people

  • 0

I’m sorry this is a very long question. I’m looking for help from people passionate about DI Containers enough to read it through. Thank you for you time!

The goal of this question is to come up with a list of features, that DI Containers can be compared against. (I don’t think this is subjective, is it?) I am not asking which container is better. I’m asking to tell me what features are implemented by some DIs but not others. This is a quite specific questions.

There has been numerous topics on SO, discussing what DI Container for .NET is best and what the options are. Most of these questions are from back 2009, and DI Containers landscape appear to have changed since than.

Now don’t get me wrong. I’m, strongly convinced that it does not matter that much which DI Container to choose as long as you give it some thought and choose one. By the way this is true not only about DI containers, but also about many other cross-cutting concerns.

However within an organization it is better to settle on a particular technology, so that developers can gain expertise on this technology and can apply it across the projects. This does not mean that aforementioned technology should be set in stone for all projects. It simply means, that if there is no compelling reason for a project to chose one DI container over another, no time is spent discussing which container must be used, because a “preferred” recommendation is set up front.

I’m trying to figure out what can make a good recommendation, as per above. Again: it is not possible to choose one-fit-all technology, but it should be possible to choose a “default” one.

This leads me to comparison criteria of DI containers. There are numerous benchmark comparisons of different DI Containers in the net. However some people things, that performance should not be choosing criteria for a DI container. There are anecdotal evidences though, that performance could matter.

This guy put together a set of comparison criteria for different DI containers, it’s a very good starting point, however there are a lot of DI containers features that are not on the list. Features like ability to support AOP-style interception and ability to register object instantiation via delegates immediately come to mind. Support for container hierarchies is another feature that is not mentioned on the list and there are many more. Support of ASP.NET MVC is usually easy to add but it’s nice if it’s provided out of the box or with an out-of-the-box extension.

As of the moment of writing there are more than a dozed of different DI Containers. In my mind I roughly categorize them like this:

Dinosaurs:

  • Castle.Windsor
  • StructureMap
  • Spring.Net

‘Dinosaurs’ does not mean ‘bad’. It means that they have a very long history, thus very mature, may have modern features but the core was developed before .NET 3.5 came around which affects their architecture. They are all available via NuGet.

LinFu:

  • LinFu – LinFu is set aside in my mind. Unlike many other projects mentioned in my list, this one didn’t see many recent releases. This article makes it sound like the author has given up on the project, although I’m sure this is not true.
  • Hiro – Same article, introduces this experimental container that pre-compiles object instantiation/injection code so that resolution time becomes comparable to the time without using DI at all. Sounds interesting, but I haven’t heard any reports of production use, and (may be my fault), this is the only project that did not work out-of-the box for me when I got is with NuGet.

Modern:

  • Unity
  • Autofac
  • Ninject
  • LightCore

These containers are based on .NET 3.5 and do not give an impression of “aged” in any way. Unity has a drawback of being over-engineered. I don’t agree with the author of this article, that the simplest way to work with the decorators in Unity is obtuse, in fact many other containers implement it exactly this way. But I do strongly agree, that whenever there is a need to customize Unity to do something that it is not doing out of the box it is a major pain.

LightCore looks nice, fast and stable, however not nearly enough documentation and it is not obvious how to implement aforementioned decorators with it. Anyone?

All these are available via NuGet.

Minimalistic:

  • Funq – limited number of features but easy to setup and fast.
  • Munq – like Funq, but with wired-in support for ASP.NET MVC and WCF
  • Petite – Really tiny one – fits in one .cs file. Flexible lambda based registration, but but not much else.
  • MicroIoC – minimalistic container for Windows Phone 7

Some of these are available via NuGet.

Those I’ve never heard of anyone using:

  • S2Container.NET
  • PicoContainer

They are mentioned on Scott Hanselman’s page listing different DI Containers available. I’ve never came across them in any other context.

These are not available via NuGet.

Another criteria is availability of commercial support. I understand that support for Castle.Windsor is available, but I think this is about it. Ninject mentions paid support on the contribute page, but no email or link is given, and since this support is most likely is not backed up by an established company it may not be reliable.

My thinking currently, that Castle.Windsor is appealing because of maturity and availability of commercial support. Unity is appealing because is backed up (although not supported) by Microsoft. Autofac and Ninject are appealing in modern, easy to use, extend and understand department, with Ninject is winning in the easy to get started category.

Now, getting this out of the way we are coming close to my real question. To be able to choose one DI container over another it is necessary to have comparison criteria. Obvious ones are feature supported. Since there is no “official” list of DI features, I’d like you to answer the question in the title: If you prefer a particular DI, what features of this DI that are important for you are not to be found (or not as easy to implement/use) in other DIs?

The goal of this question is to come up with a list of features, that DI Containers can be compared against. (I don’t think this is subjective, is it?)

Thank you in advance for all the input!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:17:16+00:00Added an answer on May 25, 2026 at 5:17 pm

    Have you read the SO question “How do the major C# DI/IoC frameworks compare?”

    It has a great answer by Mark Seemann who literally wrote the book on Dependency Injection in .Net

    He goes into the advantages and disadvantages of the most popular DI frameworks around today.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.