When running on a device, my app is throwing a TypeInitializationException
from the static constructor for System.Data.Services.Client.TypeSystem.The
constructor is attempting to populate a Dictionary<MethodInfo, string> and
failing on the lookup of method info for String.Contains(String); see
TypeSystem.cs, line 42. This code works fine on the simulator.

I'm hitting the error when my app tries to do the following:

var context = new MyDataServiceContext(myServiceRoot); // context class
generated by dataSvcUtil.exe
var query = context.Users.AddQueryOption("$filter", "Username eq 'bob'");
// query is a DataServiceQuery<User>
var uri = query.RequestUri;

The getter for RequestUri starts a call chain that eventually hits
TypeSystem.GetElementType, which thereby triggers the static constructor.

Any ideas?

Thanks,
Len
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to