Unable to load OData adapter from assembly Simple.OData.Client.V3.Adapter

I have the following code that I expect to get from OTata ( Simple.oData.Client) from a service Northwind. As soon as the user clicks the "Click" button, he launches an oData call. It displays a message before awaiton the console, but it does not print the message after await. This means that there is something in the block try-catchthat is not suitable in anticipation of work. I would like to know how to deal with this problem. I am using the Xamarin.iOS platform.

async partial  void Click_TouchUpInside (UIButton sender)
    {
        var client= new ODataClient("http://services.odata.org/Northwind/Northwind.svc/");

        Console.WriteLine("before await");

        try {
        var packages = await client
            .For("Customers").
            FindEntriesAsync();
        }
        catch(AggregateException e) {
            Console.WriteLine(e);
            Console.WriteLine(e.InnerException);
        }
    Console.WriteLine("after await");
   }

The following is a detailed error message:

System.AggregateException: --- > System.AggregateException: --- > System.InvalidOperationException: OData Simple.OData.Client.V3.Adapter --- > System.IO.FileNotFoundException: 'Simple.OData.Client.V3.Adapter' . .

+4
1

, , Simple.OData.Client github.

https://github.com/object/Simple.OData.Client/issues/53

Simple.OData.Client.V3Adapter.Reference() Main.cs, .

static void Main (string[] args)
{
    Simple.OData.Client.V3Adapter.Reference();
    UIApplication.Main (args, null, "AppDelegate");
}
+7

All Articles