ios - 在 Release模式或临时模式下编译时出错,Xamarin Forms iOS,

标签 ios xamarin xamarin.ios xamarin.forms

我在 xamarin 表单 ios 中有一个错误,它只发生在 Release模式或 Ad-Hoc 模式下,如果应用程序工作在 Debug模式下,为什么会这样?

Error Failed to resolve "System.Reflection.Emit.DynamicMethod" reference from "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" TuFacturadorApp.iOS Compilación

最佳答案

您需要确定哪些代码/包正在提取该代码,因为您不能使用 Reflection.Emit在发布配置 iOS 构建中。
注意:还要确保发布配置的链接器设置为 不是 设置为“不链接”

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.

回复:https://developer.xamarin.com/guides/ios/advanced_topics/limitations/#No_Dynamic_Code_Generation

关于ios - 在 Release模式或临时模式下编译时出错,Xamarin Forms iOS,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47564079/

相关文章:

ios - 为什么我看不到导航项的标题?

ios - 使用层动画后 View 动画突然消失

c# - 处理器架构不匹配构建错误

xamarin - Release模式下的 mvvmcross 绑定(bind)

ios - 使用 MonoTouch 部署到 App Store

ios - 应用仅使用 Facebook 作为登录选项被拒绝?

ios - Xcode 无法加载配置文件

xamarin - Sharpie 绑定(bind) Objective-C @protocols 问题

css - Xamarin 和 CSS

ios - 无法在 Xamarin 中使用 SecKeyChain 将证书存储到 KeyChain