简体   繁体   中英

Trouble integrating Azure mobile services into Windows Universal App in Visual Studio

I am currently building a Universal Windows Platform app, using an Azure database. Think all Microsoft stuff.

I created a mobile service and database through the official manage.windowsazure site. There I got 3 steps to follow, in order to add Azure :

  1. Download a personalized Mobile Service project and add it to your project

  2. Connect app and store data in it:

Add WindowsAzure.MobileServices Nuget Package to the project.

Add a public MobileServiceClient variable to app.xaml.cs

Add a sample ToDoItem class to your project

Use the Mobile Services client library to store data in the mobile service

  1. Publish app to the cloud

Now, I downloaded that starter project and put it in one of the UWP's sub folders, cause it has to be incorporated in Visual Studio Online's version control, when I commit the whole thing. Screenshot of the folder structure is here, in case it's important: http://i.imgur.com/91K7Ehq.png

Then I added the WindowsAzure.MobileServices package to both my project and the add-on Service project, just to be sure. I also added that variable, no problem. Though I didn't add that ToDoItem class, nor store any data already, since it wasn't necessary yet. Ditto for the publishing.

Now the problem: When I try to build the project or open any of the Service files, I get a huge load of errors:

http://i.imgur.com/yuPSKzf.png

http://i.imgur.com/PtZEiZG.png

Does anyone know where I went wrong? Did I forget something important? Do I have to add one project as reference to another? Or add another reference to the Service project?

I ended up solving it. I downloaded the entire project from Azure and modified that to my needs. So basically remake the whole project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM