Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 4993 [details]
I have an MvvmProject targeting mobile platforms, that uses Linq to query the database. Since Linq was introduced in .NET 3.0 and MonoTouch uses 2.1, I would really like to know what is the timeframe for MonoTouch supporting Linq, such to avoid runtime errors like the one below:
Missing method System.Linq.Expressions.Expression::Call(MethodInfo,Expression,Expression) in assembly /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll, referenced in assembly /Users/l.popescu/Library/Caches/Xamarin/mtbs/builds/*******/76603583-2419-477a-8c05-8d91d6030dcc/assemblies/*****.dll
System.MissingMethodException: Method not found: 'System.Linq.Expressions.Expression.Call'.
I don't really fancy the idea of replacing the System.Core.dll, since it violates MS policies, or using tweaks like LinqBridge.
Xamarin.iOS already supports LINQ (with the exception of expressions that requires code generation). The old profile (6.2 and earlier) was based on Silverlight, which supported LINQ, while newer versions (6.4+) supports a larger subset of 4.5 (which we call the mobile profile).
Now for some *unknown* reasons I do not see this specific method:
> public static MethodCallExpression Call (MethodInfo method, Expression args0, Expression arg1)
but it should be easy (until fixed) to use the following method instead:
> public static MethodCallExpression Call (MethodInfo method, params Expression  arguments)
Note: if you find anything else missing simply file a bug report like this one and we'll investigate it.
Looks like later SL (5?) and 4.0 added a bunch of overloads in Expression and Mono itself miss them (not specific to iOS).
Xamarin.iOS uses .NET 3.5 API for System.Linq.Expression because that the only version where we have at least limited support for interpret due to SRE limitations of iOS. The .NET 4.0 version of the API is not yet supported by Xamarin.iOS.
*** Bug 15089 has been marked as a duplicate of this bug. ***
*** Bug 16698 has been marked as a duplicate of this bug. ***
WIthout going to the full 4[.5] API for Xamarin.iOS I think it would be possible to include the new Expression overloads (which simply calls existing methods).
Even more if the new API (like above duplicate) is part of the PCL.
Fixed in master