Attempting to JIT compile method Azure.MobileServices GetSerializerFromSettings

I'm getting the following exception thrown when trying to get some simple Azure Mobile Webservices code going, using the AMWS component from the component store:

Attempting to JIT compile method 'Microsoft.WindowsAzure.MobileServices.MobileServiceJsonSerializerSettings:GetSerializerFromSettings ()' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

This is the code:

'
public async void RegisterDeviceForNotifications (string deviceToken, MobilePlatform mobilePlatform)
{
_client = new MobileServiceClient (
"[url]",
"[appkey]"
);

        var consumerDevice = new ConsumerDevice () {
            ConsumerId = 942031,
            DeviceToken = deviceToken,
            MobilePlatform = mobilePlatform.ToString ()
        };

        IMobileServiceTable<ConsumerDevice> table = _client.GetTable<ConsumerDevice>();
        await table.InsertAsync (consumerDevice);

    }'

If I remove the async/await then no exception throws, but no data is saved to the table either (I'm assuming there is an error, it just isn't caught).

Any ideas at what I can try or look at?

Posts

  • MarkGibaud.2183MarkGibaud.2183 GBUniversity ✭✭

    Ok I figured out that I somehow landed up with two references or two separate versions of Json.NET in my project - removing the older version sorted things out. Phew!

Sign In or Register to comment.