Reputation: 151
I have an error in xamarin forms ios, and it only happens in release mode, or Ad-Hoc mode, in debug mode if the app works, why is it?
Error Failed to resolve "System.Reflection.Emit.DynamicMethod" reference from "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" TuFacturadorApp.iOS Compilación
Upvotes: 1
Views: 362
Reputation: 74094
You need to determine what code/package is pulling that code in as you can not use Reflection.Emit
in a release configuration iOS build.
Note: Also make sure that your linker setting for your Release configuration is not set to "Don't link"
No Dynamic Code Generation
Since the iPhone's kernel prevents an application from generating code dynamically Mono on the iPhone does not support any form of dynamic code generation. These include:
- The System.Reflection.Emit is not available.
- No support for System.Runtime.Remoting.
- No support for creating types dynamically (no Type.GetType ("MyType`1")), although looking up existing types (Type.GetType ("System.String") for example, works just fine). Reverse callbacks must be registered with the runtime at compile time.
re: https://developer.xamarin.com/guides/ios/advanced_topics/limitations/#No_Dynamic_Code_Generation
Upvotes: 2