My app works perfectly in the simulator, but I'm encountering the following
error when running on the device:

*"System.ExecutionEngineException has been thrown"
Attempting to JIT compile method
'System.Linq.Enumerable:<FirstOrDefault'1>m__5A<int> (int)' while r...*

The line of code that triggers this is:

*ac.CategoryId = categories.Where (c => c.Name == categoryName).Select (c =>
c.CategoryId).FirstOrDefault ()*

The categories collection is a sql-net collection of category records, and
(correctly) contains 7 items.

Am I doing something wrong here?

FYI, I'm using the latest betas of MD and MT.

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/System-ExecutionEngineException-thrown-on-device-tp4406984p4406984.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to