Bug 13081 - Cannot load System.Linq.Expressions in PCL
Summary: Cannot load System.Linq.Expressions in PCL
Status: RESOLVED DUPLICATE of bug 16254
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.7.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Martin Baulig
Depends on:
Reported: 2013-07-07 04:50 UTC by Stefan Schoeb
Modified: 2014-05-18 17:01 UTC (History)
26 users (show)

Tags: pcl
Is this bug a regression?: ---
Last known good build:

Sample AssemblyInfo with required TypeForward attributes to fix facade assembly (3.11 KB, text/plain)
2013-09-04 05:47 UTC, guillaume.moissaing
Fixed Facade assembly. (12.00 KB, application/x-msdownload)
2013-09-04 16:56 UTC, Martin Baulig

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 Developer Community or GitHub 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.

Related Links:

Description Stefan Schoeb 2013-07-07 04:50:33 UTC
Description in the forum:

This should work as the System.linq.Expressions-Assembly is available Profile78. 

I'm working with the latest alpha (4.7.11) on a Windows 8 pc. 

Code executed in my PCL-project:
var constantExpression = System.Linq.Expressions.Expression.Constant(5);

Exception in output:
Unhandled Exception:

System.TypeLoadException: Could not load type 'System.Linq.Expressions.ConstantExpression' from assembly 'System.Linq.Expressions, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
07-07 08:44:46.700 E/mono    ( 2358): 
07-07 08:44:46.700 E/mono    ( 2358): Unhandled Exception:
07-07 08:44:46.700 E/mono    ( 2358): System.TypeLoadException: Could not load type 'System.Linq.Expressions.ConstantExpression' from assembly 'System.Linq.Expressions, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

This is a serious bug/problem. As MvvmCross does need this to run...
Comment 1 Tomasz Cielecki 2013-07-08 09:19:33 UTC
I am hitting this issue too and apparently only occurs when having WP8 as target in your PCL. This means that the PCL is using Profile78.

As you this has quite some severity, which means that Mvx projects do not run. As a work around for Droid, I need to either use a PCL using another profile, or a Android Library.
Comment 2 Hermann Hubschle 2013-07-28 11:23:58 UTC
I have the same problem. 
Essentially prevents me from using async/await.
Comment 3 j.penc 2013-08-08 09:47:49 UTC
I am running into the same problem (Xamarin Studio for Mac). In iOS Simulator everything works fine but when building for iOS device (i.e. making use of the linker) the build fails with the following error:

error MT2002: Failed to resolve "System.Linq.Expressions.ConstantExpression System.Linq.Expressions.Expression::Constant(System.Object)" reference from "System.Linq.Expressions, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

I use Newtonsoft.Json and System.Net.Http.Formatting as PCL libraries - both have a reference to System.Linq.Expressions with the same PublicKeyToken. I also have some PCL projects which all target framework 78 (NET4.5, RT, WinPhone8).

I am using Mono 3.1.2 with the PCL support, Xamarin Studio 4.0.10 (as 4.0.11 and 4.0.12 crash both when loading any project) and iOS 6.4.2

This is a serious problem as we can only build and run in simulator mode, not on real devices.
Comment 4 j.penc 2013-08-12 09:53:31 UTC
Ok, new information concerning this bug available (I hope it will help getting this fixed).

I have a method in my PCL that uses an Expression as parameter:

public void RaisePropertyChanged<T>(Expression<Func<T>> propertyExpression) 

When trying to use that method the following error occurs during runtime (remember I can compile and run in simulator:

´Could not load signature of MyClass:RaisePropertyChanged due to: Failed for unknown reasons.
mono-rt: Stacktrace:

mono-rt:   at <unknown> <0xffffffff>

mono-rt:   at (wrapper managed-to-native) System.Reflection.MonoMethod.get_IsGenericMethod (System.Reflection.MonoMethod) <IL 0x0002d, 0xffffffff>

mono-rt:   at System.Reflection.MonoMethod.get_ContainsGenericParameters () [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:447

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.GetCallbackMethodsForType (System.Type,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationErrorCallback>&) <IL 0x00054, 0x00210>

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveCallbackMethods (Newtonsoft.Json.Serialization.JsonContract,System.Type) <IL 0x0000c, 0x0007f>

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract (Newtonsoft.Json.Serialization.JsonContract) <IL 0x000c1, 0x0035b>

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract (System.Type) <IL 0x00009, 0x0007b>

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type) <IL 0x000ba, 0x00360>

mono-rt:   at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type) <IL 0x00033, 0x00161>

mono-rt:   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.GetContractSafe (System.Type) <IL 0x00011, 0x0005a>

mono-rt:   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader,System.Type,bool) <IL 0x00010, 0x00097>

mono-rt:   at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader,System.Type) <IL 0x001e7, 0x009f3>

mono-rt:   at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader,System.Type) <IL 0x00003, 0x0002d>

mono-rt:   at System.Net.Http.Formatting.JsonMediaTypeFormatter.ReadFromStream (System.Type,System.IO.Stream,System.Net.Http.HttpContent,System.Net.Http.Formatting.IFormatterLogger) <IL 0x000af, 0x00423>

mono-rt:   at System.Net.Http.Formatting.JsonMediaTypeFormatter.ReadFromStreamAsync (System.Type,System.IO.Stream,System.Net.Http.HttpContent,System.Net.Http.Formatting.IFormatterLogger) <IL 0x00022, 0x000ff>

mono-rt:   at System.Net.Http.HttpContentExtensions/<ReadAsAsyncCore>d__0`1<object>.MoveNext () <IL 0x000ac, 0x00278>

mono-rt:   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<object>.Start<System.Net.Http.HttpContentExtensions/<ReadAsAsyncCore>d__0`1<object>> (System.Net.Http.HttpContentExtensions/<ReadAsAsyncCore>d__0`1<object>&) [0x0001b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs:112

mono-rt:   at System.Net.Http.HttpContentExtensions.ReadAsAsyncCore<object> (System.Net.Http.HttpContent,System.Type,System.Net.Http.Formatting.IFormatterLogger,System.Net.Http.Formatting.MediaTypeFormatter) <IL 0x00040, 0x0011b>

mono-rt:   at System.Net.Http.HttpContentExtensions.ReadAsAsync<T> (System.Net.Http.HttpContent,System.Type,System.Collections.Generic.IEnumerable`1<System.Net.Http.Formatting.MediaTypeFormatter>,System.Net.Http.Formatting.IFormatterLogger) <IL 0x000f2, 0x005ef>

mono-rt:   at System.Net.Http.HttpContentExtensions.ReadAsAsync (System.Net.Http.HttpContent,System.Type,System.Collections.Generic.IEnumerable`1<System.Net.Http.Formatting.MediaTypeFormatter>) <IL 0x00004, 0x0003f>

mono-rt:   at System.Net.Http.HttpContentExtensions.ReadAsAsync (System.Net.Http.HttpContent,System.Type) <IL 0x00007, 0x0005b>

mono-rt:   at ixx.ais.Client.ServiceConnector.Rest.RestConnector/<PrepareResponseAsync>c__async3.MoveNext () [0x00238] in /Users/jpenc/TFS.Walluf/ixx.zwo/proj/dev/dev/src/Mobile/ServiceConnector/RestConnector.cs:244

mono-rt:   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<ixx.ais.Shared.Common.Service.ResponseBase>.Start<ixx.ais.Client.ServiceConnector.Rest.RestConnector/<PrepareResponseAsync>c__async3> (ixx.ais.Client.ServiceConnector.Rest.RestConnector/<PrepareResponseAsync>c__async3&) [0x0001b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs:112

mono-rt:   at ixx.ais.Client.ServiceConnector.Rest.RestConnector.PrepareResponseAsync (System.Net.Http.HttpResponseMessage,ixx.ais.Shared.Common.Service.RequestBase) <IL 0x0002e, 0x000bf>

mono-rt:   at ixx.ais.Client.ServiceConnector.Rest.RestConnector/<SendAsync>c__async2.MoveNext () [0x0028a] in /Users/jpenc/TFS.Walluf/ixx.zwo/proj/dev/dev/src/Mobile/ServiceConnector/RestConnector.cs:153

mono-rt:   at (wrapper unbox) ixx.ais.Client.ServiceConnector.Rest.RestConnector/<SendAsync>c__async2.MoveNext () <IL 0x0000a, 0xffffffff>

mono-rt:   at System.Threading.Tasks.SynchronizationContextContinuation.<Execute>m__36 (object) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs:141

mono-rt:   at MonoTouch.UIKit.UIKitSynchronizationContext/<Post>c__AnonStorey52.<>m__4E () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIKitSynchronizationContext.cs:24

mono-rt:   at MonoTouch.Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSAction.cs:87

mono-rt:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004e, 0xffffffff>

mono-rt:   at <unknown> <0xffffffff>

mono-rt:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>

mono-rt:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38

mono-rt:   at Mobile.View.Application.Main (string[]) [0x00008] in /Users/jpenc/TFS.Walluf/ixx.zwo/proj/dev/dev/src/Mobile/View/Main.cs:18

mono-rt:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Comment 5 Miguel de Icaza [MSFT] 2013-09-03 11:38:56 UTC
We are looking into this, it seems to be an issue with our facade assemblies.
Comment 6 guillaume.moissaing 2013-09-04 05:47:28 UTC
Created attachment 4777 [details]
Sample AssemblyInfo with required TypeForward attributes to fix facade assembly
Comment 7 Martin Baulig 2013-09-04 16:53:15 UTC
I just checked this on my Mac and your version of monodroid is too old for PCL.  This works fine with our latest alpha build.  I'll attach a fixed version of the System.Linq.Expression.dll and instructions how to generate and/or install it.
Comment 8 Martin Baulig 2013-09-04 16:56:43 UTC
Created attachment 4781 [details]
Fixed Facade assembly.

Put this into /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/Facades/.
Comment 9 Martin Baulig 2013-09-04 17:00:12 UTC
You can also compile this yourself:

1. Checkout mono/master
2. Create mcs/class/lib/monodroid
3. Copy mscorlib.dll, System.dll and System.dll from Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1 into that directory
4. cd into mono/mcs/class/Facades
5. make PROFILE=monodroid
6. mcs/class/lib/monodroid/Facades/System.Linq.Expression.dll is the fixed facade assembly, copy it into /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/Facades/.
Comment 10 guillaume.moissaing 2013-09-27 05:31:47 UTC
Using this facade assembly, i still get exceptions using IQueryable<>.
Comment 11 Øystein Krog 2013-10-11 11:31:49 UTC
I'm seeing this issue trying to compile for monotouch w/linking.
Both ninject (portable version) and autofac fails due to this problem, it would be really nice if it was fixed.

Also, is the posted fix still applicable for mono 3.2.3 and monotouch? 
How do I use it for monotouch?

My current test project is a monotuch app + PCL "model" (with autofac), here is the specific error I get:

error MT2002: Failed to resolve "System.Linq.Expressions.ParameterExpression System.Linq.Expressions.Expression::Variable(System.Type,System.String)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
Comment 12 Stuart Lodge 2013-10-18 04:47:59 UTC
This appears to have regressed in recent Stable versions - somewhere 4.8.1 to 4.8.3 in Android - see http://stackoverflow.com/questions/19437006/binding-in-mvvmcross-test-application-for-android-does-not-work-targetinvocatio/19445268#19445268

Can we get some low level public details of how Xamarin tests it's stable releases please? Having those would allow me to push back at some of the complaints I'm getting about breakages.
Comment 13 Stuart Lodge 2013-10-18 04:52:12 UTC
Although actually I'm not sure if this is regression of the existing bug or a new bug - as the error message suggests that the type loading path is a different path - it seems that `System.Linq.Expressions.Expression` is trying to be loaded from a non-system library? 

`Could not load type 'System.Linq.Expressions.Expression' from assembly 'AndroidDemo.Core'`

The sample linked to http://stackoverflow.com/questions/19437006/binding-in-mvvmcross-test-application-for-android-does-not-work-targetinvocatio/ shows this - all binaries and files are there - only small problem is that the poster didn't include the Android project within the sln file.
Comment 14 Lucian POPESCU 2013-10-18 06:22:13 UTC
Using this facade assembly, i still get an MT2002 message:

Erreur   2             MT2002:Failed to resolve "System.Linq.Expressions.Expression System.Linq.Expressions.ExpressionVisitor::Visit(System.Linq.Expressions.Expression)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" [C:\DevSpace\Dev\DotNet\Demo\ObsMed3\Client\Next.Client.App.Ios\Next.Client.App.Ios.csproj]
                               0             0
Comment 15 Lucian POPESCU 2013-10-18 06:24:00 UTC
Version information

Microsoft Visual Studio Ultimate 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709

Version installée : Ultimate

Outils d'architecture et de modélisation   04940-004-0038003-02231
Outils d'architecture et de modélisation Microsoft
UML® et Unified Modeling Language™ sont des marques ou des marques déposées de Object Management Group, Inc. aux États-Unis d'Amérique et dans d'autres pays.

Team Explorer pour Visual Studio 2012   04940-004-0038003-02231
Microsoft Team Explorer pour Visual Studio 2012

Vérificateur orthographique d'analyse du code Visual Studio 2012   04940-004-0038003-02231
Vérificateur orthographique d'analyse du code Microsoft® Visual Studio® 2012

Parties de International CorrectSpell™ spelling correction system © 1993 de Lernout & Hauspie Speech Products N.V. Tous droits réservés.

The American Heritage® Dictionary of the English Language, troisième édition Copyright © 1992 Houghton Mifflin Company. Version électronique sous licence Lernout & Hauspie Speech Products N.V. Tous droits réservés.

Visual Basic 2012   04940-004-0038003-02231
Microsoft Visual Basic 2012

Visual C++ 2012   04940-004-0038003-02231
Microsoft Visual C++ 2012

Visual C# 2012   04940-004-0038003-02231
Microsoft Visual C# 2012

Visual F# 2012   04940-004-0038003-02231
Microsoft Visual F# 2012

Windows Phone SDK 8.0 - FRA   04940-004-0038003-02231
Windows Phone SDK 8.0 - FRA

AlignAssignments   1.0
Command for aligning assignments.

CustomDocWell   1.0
Provides configurable behavior for the document well in Visual Studio 2012.

Entity Framework Power Tools   1.0
Adds useful design-time DbContext features to the Visual Studio Solution Explorer context menu. 

When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:

1) View Entity Data Model - Displays the underlying Code First model in the Entity Framework designer.
2) View Entity Data Model XML - Displays the EDMX XML representing the underlying Code First model.
3) Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.

Gestionnaire de package NuGet   2.7.40911.225
Gestionnaire de packages NuGet dans Visual Studio. Pour plus d’informations sur NuGet, consultez http://docs.nuget.org/.

JetBrains ReSharper 7.1   Full Edition build 7.1.3000.2259 on 2013-04-10T16:34:56
JetBrains ReSharper 7.1 package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2013 JetBrains, Inc.

Microsoft Advertising SDK for Windows Phone   6.2.923.0
Microsoft Advertising SDK for Windows Phone
Build 6.2.923.0

Microsoft XNA Game Studio   4.0
Microsoft XNA Game Studio 4.0
Build 4.0.40906.0

Mobile.Design   1.0
Information about my package

OptionsPageImpl   1.0
Information about my package

PowerCommands for Visual Studio 2010   1.0
A set of power commands for Visual Studio 2010

PreEmptive Analytics Visualizer   1.0
Extension Microsoft Visual Studio permettant de visualiser des résumés agrégés à partir du produit PreEmptive Analytics.

Quick Launch Tasks   1.0
Microsoft Quick LaunchTasks package adds accessibility and settings tasks to the Quick Launch tool.

VSColorOutput   1.4.3
Color output for build and debug windows - http://blueonionsoftware.com/vscoloroutput.aspx

Web Developer Tools   1.2.40308.0
Microsoft Web Developer Tools contient les composants suivants :
Inspecteur de page : outil offrant une manière efficace de décomposer les applications web et de diagnostiquer les problèmes frontaux.
Publication Web : extensions requises pour la publication sur le web, pour les serveurs hébergés et sur site.
Modèles de formulaires web : inclut les modèles par défaut pour les applications de formulaire web.
Extensions Éditeur : inclut les extensions éditeur HTML, CSS et JS qui améliorent considérablement l’expérience de développement.

Xamarin.Android   4.8.03015 (a25a31d0)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   1.4.2 (7e177260)
Visual Studio extension to enable development for Xamarin.iOS

For more information about VMware, Inc., see their website at
Copyright (c) 2012 VMware, Inc.
Comment 16 Øystein Krog 2013-10-30 09:19:12 UTC
After building/installing mono git and installing the official PCL reference assemblies (in /Library/Frameworks/Mono.framework/External/xbuild-frameworks/.NETPortable), this is still not working.
I tried with a few different PCL profiles but it did not seem to make a difference.

Would be good to get an update on this.

error MT2002: Failed to resolve "System.Linq.Expressions.ParameterExpression System.Linq.Expressions.Expression::Variable(System.Type,System.String)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
Comment 17 Martin Baulig 2013-11-06 12:29:56 UTC
You also need the latest alpha builds of Xamarin.iOS for this in addition to the reference assemblies.  There have been some problems with the Facade Assemblies which have been fixed recently.
Comment 18 Øystein Krog 2013-11-12 09:58:37 UTC
With the latest alpha I can no longer compile projects that reference PCL projects from Xamarin Studio, so it's a bit harder to test at all..
I can still compile/debug from VS though, so I tested it that way.
My autofac test still fails. If I disable linking it works, so I suspect the problem remains.
Comment 19 Øystein Krog 2013-11-13 04:39:19 UTC
After removing the official PCL libraries I can once again compile/link PCL projects in Xamarin Studio (both stable/alpha).

However, this bug still remains, linking an iOS project that references a project that uses Autofac (PCL) or Ninject (also PCL) fails with a linker error:

error MT2002: Failed to resolve "System.Linq.Expressions.ParameterExpression System.Linq.Expressions.Expression::Variable(System.Type,System.String)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"

Please take a look at this, I've been reporting this bug for a long time now and it's IMHO a really big problem if the PCL support can't handle some of the most popular PCL projects/nugets.

If you want a repro-project I can provide it, but it's really very easy to set up, just create new iOS project, and a PCL project. Add a reference to the PCL project in the iOS project.
Reference autofac in both projects, for the PCL project this can be done with nuget, but for the iOS project you will have to add the reference manually.
Finally use some autofac types in both projects.
Upon compiling the iOS project (with linking enabled) you will get the above linker error.
Comment 20 Mike Perry 2013-11-27 10:12:53 UTC
This issue still exists with Xamarin studio 4.2.

Error MT2002: Failed to resolve "System.Linq.Expressions.Expression System.Linq.Expressions.ExpressionVisitor::Visit(System.Linq.Expressions.Expression)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" (MT2002) (JCI.BE.SmartBuilding.SETMobile)

I get this when compiling an IPA when using the AutoMapper PCL
Comment 21 Øystein Krog 2013-11-27 10:46:39 UTC
Yes, see this new issue I opened, where some progress has been made in 

From I understand it turns out that mono quite simply does not implement many of the Linq Expression APIs.
Some Xamarin developers commented on this and basically said that it should be possible to add it, but I have not seen any official response/commitment to do so.
Comment 22 Ciaran Byrne 2014-02-24 07:59:48 UTC
Is there any update on a fix for this for Xamarin iOS ? I'm using JSON.NET and the PCL 7 and I'm also getting this error.
Comment 23 Zach Green 2014-02-26 15:37:06 UTC
I am also running into this using the SQLite.NET PCL library.

Error MT2002: Failed to resolve "System.Linq.Expressions.MethodCallExpression System.Linq.Expressions.Expression::Call(System.Linq.Expressions.Expression,System.Reflection.MethodInfo,System.Linq.Expressions.Expression,System.Linq.Expressions.Expression)" reference from "System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" (MT2002) 

What is the best path forward?
Comment 24 Mike Perry 2014-02-26 15:55:45 UTC
@zach - you can just include this sqlite class:


I created a base repository using methods this library exposes and it works quite well.
Comment 25 Zach Green 2014-02-26 16:06:37 UTC
Well, I am also using the SQLite.net PCL Async Library but I guess I could do the same with that too, right?
Comment 26 Mike Perry 2014-02-26 16:19:21 UTC
@zach - yep - just include the file and build a repo around it.

I created a generic repository around it with methods like this:

private void Insert(T item) {
			if (item == default(T))
				throw new ArgumentException ("item");

			using (var connection = GetConnection()) {
				connection.Insert (item);
Comment 27 Anuj Bhatia 2014-04-17 11:54:58 UTC

*** This bug has been marked as a duplicate of bug 16254 ***
Comment 28 Johannes Rudolph 2014-05-18 17:01:55 UTC
This could be resolved it in Xamarin.iOS 7.2.2 - just found out because a colleague couldn't build our code while I could. 

Version: (Business Edition)
Hash: db4427f
Build date: 2014-04-22 12:49:14-0400

Could someone retriage this and/or update the status of the bug accordingly? Maybe has something to do with the dynamic support announced in 7.2? Anyway, good job!