xamarin.formscontrollerazure-mobile-services

Error : Value cannot be null. Parameter name : path 1, when add a new Azure Mobile Apps table Controller


It's the first time I create a back end for my Xamarin.Forms application. I follow instructions on Azure Portal -> Quick-Start, create a data connection, choose c# in step 2 and download the project.

Build it and now I want to add a new table. So :

What can I do to fix that ?

Sorry for my bad English.

Have a nice day!


Solution

  • I have the same problem, and the problem is also mentioned on the Visual Studio Development community: https://developercommunity.visualstudio.com/content/problem/563354/adding-a-new-azure-mobile-apps-table-controller-or.html

    Meanwhile you can work around the problem by creating the controller in code. I've tested the following steps for a Azure Mobile Apps Table Controller for a Xamarin Forms app:

    1. Add a new class to the Controllers folder, i.e. {YourDataObject}Controller.cs
    2. Take an existing and working controller and copy the code into the new controller file.
    3. Replace {OldMobileAppName}Service and {OldMobileAppName}Context with {NewMobileAppName}Service and {NewMobileAppName}Context
    4. Replace {OldDataObjectName} with {NewDataObjectName}

    Finally publish your solution.