Mono compatible Dependency Injection Framework

2019-02-12 09:50发布

问题:

Which Dependency Injection frameworks are compatible (and tested) against the Mono 2.4.2.3 runtime (Release Notes)?

回答1:

This SO question relates to using NHibernate with MONO 2.4:

ASP.NET MVC 1 and 2 on Mono 2.4 with Fluent NHibernate

I have used Unity with Mono 2.4.2 successfully before.

Hope this helps :)



回答2:

Castle Windsor is.



回答3:

Autofac most certainly is.



回答4:

Worth noting that over 3 years down the line I'm yet to come across an IoC Container that doesn't work on Mono.

Note: Reflection based approaches to registration will not likely work on AOT compilation based platforms such as iOS via MonoTouch.