kanayabhattad / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Monotouch support #457

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I love autofac and wish i could use it for cross-platform mobile dev.

1. I compiled sources as MonoTouch library (had to remove some stuff dealing 
with Metadata, as Monotouch doesn't support some Expressions 
https://bugzilla.xamarin.com/show_bug.cgi?id=14765)
2. I tried to register Int32 type as IFormattable and got an exception.
Seems that Monotouch AOT compiler has some generics restrictions that don't 
doesn't typeof(T) :(

I have a bad feeling that Autofac contains of cool complex generics-based code 
that is definitely not supported by Monotouch AOT, but i have a small hope that 
still warms me.

Probably somebody have encountered this issue already and can share some 
knowledge if it feasible to make it work on IOS or not.

Original issue reported on code.google.com by alexande...@gmail.com on 15 Sep 2013 at 5:40

GoogleCodeExporter commented 8 years ago
We moved to Portable Class Library format to try and support as many platforms 
as possible without having conditional builds, high test effort, etc. In doing 
so, we moved to pretty much the lowest common denominator in the Autofac core 
that we can get to and still reasonably support. It's unfortunate that 
Monotouch doesn't support all the generics and generic restrictions that we 
use, but I don't think we'll be building a separate Monotouch-specific version 
of Autofac.

If, however, you'd like to contribute and see what it'd take to get working, 
we're always open to accepting contributions. Again, though, we are trying to 
stay away from conditional compilation since that made things pretty complex in 
the past.

If you have a more broad-based question about whether *anyone* has ever gotten 
this working (I surely haven't, and I don't think Alex has), perhaps the 
newsgroup (http://groups.google.com/group/autofac) or StackOverflow 
(http://stackoverflow.com/questions/tagged/autofac) might yield you some better 
results?

Sorry I couldn't be of more help.

Original comment by travis.illig on 24 Sep 2013 at 2:36