[英]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. 我目前正在使用Azure数据库构建通用Windows平台应用程序。 Think all Microsoft stuff. 考虑所有微软的东西。
I created a mobile service and database through the official manage.windowsazure site. 我通过官方manage.windowsazure网站创建了移动服务和数据库。 There I got 3 steps to follow, in order to add Azure : 为了添加Azure,我要遵循3个步骤:
Download a personalized Mobile Service project and add it to your project 下载个性化的移动服务项目并将其添加到您的项目中
Connect app and store data in it: 连接应用程序并在其中存储数据:
Add WindowsAzure.MobileServices Nuget Package to the project. 将WindowsAzure.MobileServices Nuget包添加到项目中。
Add a public MobileServiceClient variable to app.xaml.cs 将公共MobileServiceClient变量添加到app.xaml.cs
Add a sample ToDoItem class to your project 将示例ToDoItem类添加到您的项目
Use the Mobile Services client library to store data in the mobile service 使用移动服务客户端库将数据存储在移动服务中
- 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. 现在,我下载了该启动程序项目,并将其放在UWP的子文件夹之一中,因为当我提交整个内容时,必须将其合并到Visual Studio Online的版本控件中。 Screenshot of the folder structure is here, in case it's important: http://i.imgur.com/91K7Ehq.png 如果重要的话,这里是文件夹结构的屏幕截图: 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. 然后,请确保将WindowsAzure.MobileServices包添加到我的项目和附加服务项目中。 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. 尽管我没有添加该ToDoItem类,也没有存储任何数据,因为还没有必要。 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: 现在的问题是:当我尝试构建项目或打开任何Service文件时,我收到大量错误:
http://i.imgur.com/yuPSKzf.png http://i.imgur.com/yuPSKzf.png
http://i.imgur.com/PtZEiZG.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? 或添加对Service项目的其他引用?
I ended up solving it. 我最终解决了它。 I downloaded the entire project from Azure and modified that to my needs. 我从Azure下载了整个项目,并根据需要进行了修改。 So basically remake the whole project. 因此,基本上可以重做整个项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.