Hello Michael, This is a planned enhancement but it requires us to switch to the new compiler and version of mono.
Right now MonoTouch ships with two mscorlib.dll, one for the compiler (smcs) and one for the runtime. The former is needed by the compiler (used for itself and compiled against) and must include System.Reflection.Emit (SRE). Once we switch to the new compiler will be able to use (compile against) an mscorlib.dll assembly that does not contains SRE which will make spot those errors at compile time. Regards, Sebastien On Sat, Nov 12, 2011 at 2:21 PM, Michael Muegel <[email protected]> wrote: > Why is the System.Reflection.Emit namespace in mscorlib? It is not allowed > on the device. If it is needed for some internal workings, wouldn't it be > best to provide some way to give a compiler error always, including on the > simulator target. I mean line C# level errors. > As an end user, what I see is this if I stumble upon some 3rd party code > that uses System.Reflection.Emit: > > On simulator, compiles/links/runs fine > On device, compiles but gives linking error when "Link SDK assemblies only" > mode is used > On device, compiles and links when "Don't Link" mode is used, but gives > crash error on device > > All three are very poor user experiences and lead to end user questions, > confusion, and frustration. > -Mike > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > > _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
