Azure Mobile Services: invalid operation exception (build for a specific platform not found)

I developed the application on Xamarin.iOS using the Azure Mobile Services component, it works fine, only today I made some changes and then started to get this exception. No matter what I do, it still believes that this .Ext library is missing

A Windows Azure mobile device node for the current platform was not found. Verify that the current project is referencing Microsoft.WindowsAzure.Mobile and the following build platform: Microsoft.WindowsAzure.Mobile.Ext.

I made sure that I uninstall and install the component through Xamarin.Studio, I also added a manual link to the libraries (with the extension for the platform), but it is still useless.

Any ideas?

+6
source share
2 answers

I found a solution in this blog post

Apparently, I missed one line in setting up mobile services on a mobile device, namely:

CurrentPlatform.Init(); 

As soon as I added this line, the problem disappeared. They must have used the old dlls before I cleared the solution and moved some code, after which it started to break. Adding the line above has been fixed for me, and hope this helps someone else.

+7
source

Thanks, I manually add the line

 Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init() 

in AppDelegate.cs , then works fine.

 public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); LoadApplication(new App()); return base.FinishedLaunching(app, options); } 
0
source

Source: https://habr.com/ru/post/971630/


All Articles