System.ExecutionEngineException: Attempting to JIT compile method System.Linq.Enumerable
2014-11-14 11:12
417 查看
关于JIT编译和AOT编译的问题。IOS下是不支持JIT动态编译的,所以如果程序有涉及JIT编译的都会无法执行。
在google查过说unity是不支持部分的Linq功能,如Sort方法。
但我在unity里面没有用到Linq的Sort方法,不过有用到OrderBy, FirstOrDefault, Where等。结果还是出现这个错误,
以防万一只能将所有用到的Linq方法重写。
如:类似System.Linq.Enumerable.Where的方法
Since applications on the iPhone using Xamarin.iOS are compiled to static code, it is not possible to use any facilities that require code generation at runtime.
From: http://developer.xamarin.com/guides/ios/advanced_topics/limitations/
在google查过说unity是不支持部分的Linq功能,如Sort方法。
但我在unity里面没有用到Linq的Sort方法,不过有用到OrderBy, FirstOrDefault, Where等。结果还是出现这个错误,
以防万一只能将所有用到的Linq方法重写。
如:类似System.Linq.Enumerable.Where的方法
public static IEnumerable<T> Filter<T>(this IEnumerable<T> source, Func<T, bool> predicate) { if (source == null || predicate == null) { throw new ArgumentNullException(); } return impl(source, predicate); } private static IEnumerable<T> impl<T>(IEnumerable<T> source, Func<T, bool> predicate) { foreach (T item in source) { if (predicate(item)) { yield return item; } } }
Since applications on the iPhone using Xamarin.iOS are compiled to static code, it is not possible to use any facilities that require code generation at runtime.
From: http://developer.xamarin.com/guides/ios/advanced_topics/limitations/
相关文章推荐
- Attempting to JIT compile method '(wrapper delegate-invoke) System.Reflectio错误
- Attempting to JIT compile method '(wrapper native-to-managed)
- 报错:System.NotSupportedException: LINQ to Entities does not recognize the method
- ProcessEngine cannot be jbpm org.apache.jasper.JasperException: Unable to compile class for JSP:
- 引发类型为“System.ExecutionEngineException”的异常
- System.InvalidCastException: 指定的转换无效 Linq ToList()
- System.NotSupportedException: LINQ to Entities 不识别方法“System.Decimal ToDecimal(Int32)”,因此该方法无法转换为存储表达
- 20080509 - System.ExecutionEngineException 在 DefaultDomain 中发生
- NHibernate 3 - Extending the Linq Provider to fix some System.NotSupportedException
- “System.NotSupportedException”类型的异常在 System.Data.Entity.dll 中发生,但未在用户代码中进行处理 其他信息: 在 LINQ to Entitie
- "Exception of type System.ExecutionEngineException was thrown"
- 在使用Linq to SQL并序列化一个数据对象的时候报System.InvalidOperationException异常,序列化类型XXX的对象时检测到循环引用。
- Windows Phone App的dump文件实例分析- System.ExecutionEngineException
- 引发类型为“System.ExecutionEngineException”的异常
- 在使用Linq to SQL并序列化一个数据对象的时候报System.InvalidOperationException异常,序列化类型XXX的对象时检测到循环引用。
- Linq to SQL: System.InvalidCastException: Specified cast is not valid
- 关于Linq to SQL 的“异常详细信息: System.InvalidCastException: 指定的转换无效。”
- 转 引发类型为“System.ExecutionEngineException”的异常。
- System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException: Operation is not valid due to the current state of the obj
- jsp数据库连接类错误 org.apache.jasper.JasperException: Unable to compile class for JSP