8

I have a fresh install of Visual Studio 2017, RTM (15.0.0+26228.9). I created a new project from the "Azure Mobile App" template. (created fine) Then, under the Controllers folder, I right-clicked "Add Controller...". I tried each of the following 2 templates, and received an error on each:

Azure Mobile Apps Custom Controller
Azure Mobile Apps Table Controller

Considering the Table Controller first, I received the error: There was an error running the selected code generator: 'A TwoWay or OneWayToSource binding cannot work on the read-only property 'EntityTypes' of type 'Microsoft.Cct.MobileApps.WebExtensions.Scaffolding.MobileAppsTableControllerViewModel'.'

The Custom Controller allowed me to select the controller name, then showed the error: There was an error running the selected code generator: 'Could not find template '' in these folders ['C:\Program Files (x86)\Microsoft SDKs\Microsoft Azure\Mobile Apps\2.0\Scaffold'], including sub-folders.'

The standard Web API Controller - Empty worked fine.

Azure App Services Tools shows v3.0.0 (15.0.30209.0).

EDIT 4/1/2017: Reproduced the table controller symptom with a fresh Mobile App project, same error for table creation, even after reinstalling with latest tool version, as directed in comments:

enter image description here

enter image description here

Any ideas?

-John

JohnKoz
  • 908
  • 11
  • 21
  • Did you manage to solve the issue with the TableController? I had the exact same scenario as you have described. The selected answer fixed my problem with custom controller but I still cannot create a table controller! – xhedgepigx Dec 31 '17 at 00:40

1 Answers1

4

Go to https://www.microsoft.com/en-us/download/details.aspx?id=54917, download AzureMobileAppsSdkPackagesV2.0.msi only and install it. Then try to add a new custom controller once more and the problem should be gone.

juliano.net
  • 7,982
  • 13
  • 70
  • 164
  • I downloaded the AzureMobileAppsSDKPackagesV2.0.mis, and installed it. It completed fine. I can successfully make a Custom controller now, but still not a Table controller - same error. I reran the install, it asks to uninstall or repair. I asked to repair, same outcome with controllers. The Add Remove Programs reports 2.0.50228.0. – JohnKoz Mar 29 '17 at 18:07
  • For the Table Controller I guess the problem may be related to your class structure. Can you add the code to your question? – juliano.net Mar 30 '17 at 11:00
  • Which class structure? EntityData? – mister_giga Mar 31 '17 at 13:28
  • Not sure it's related to my class structure, I created a new Mobile App project, then immediately tried to crate a Table Controller and experienced the same symptom. I edited my original post with the OOB project structure. – JohnKoz Apr 01 '17 at 14:06
  • @mister_giga, not sure what you're asking? – JohnKoz Apr 01 '17 at 14:07
  • Did you ever get to solve this issue? I am having the exact same problem. I also found this https://developercommunity.visualstudio.com/content/problem/31200/working-with-xamarin-forms-mobile-app-backend-cann.html – Amir May 06 '17 at 03:55