I have an application that has an android and ios project with shared code. The android application works perfect and uses the SDK Only linker. I also have a Linker file to
If you are using "Link SDK assemblies only" option on iOS project, then all of those --linkskip
arguments won't do anything as only the SDK assemblies are being linked. So the EntityFrameworkCore
might be using something that is being linked away that is in the Xamarin.iOS SDK assemblies. System.Linq
is part of the SDK and adds extension methods for many database types.
So I think you may be hitting this issue: https://github.com/xamarin/xamarin-macios/issues/3394
If so, try putting:
[assembly: Preserve (typeof (System.Linq.Queryable), AllMembers = true)]
in the Main.cs file of the iOS project outside of the namespace, e.g.:
using UIKit;
[assembly: Preserve (typeof (System.Linq.Queryable), AllMembers = true)]
namespace
{
...
}