Microsoft.Phone.Tasks namespace is not available

冷暖自知 提交于 2019-12-23 08:05:44

问题


Namespace Microsoft.Phone.Tasks is not available in XAML page code behind file of my Windows Phone application. Please see the screenshot.

In the properties windows of the project I see:

Target: Windows Phone 8.1

Am I missing an assembly reference or something?


回答1:


Windows Phone 8.1 XAML apps don't have Microsoft.Phone.Tasks namespace to make common UI framework with windows Runtime APIs. Still you can code up a few tasks by using Windows.ApplicationModel namespace. As you havent claried which task you want to use, so here's the link to the whole MSDN article. http://code.msdn.microsoft.com/windowsapps/WindowsPhone-Store-81-vs-25c80c2a




回答2:


From your Screenshot. I see your project is Windows Phone 8.1, not Windows Phone Silverlight 8.1 . Please see your Solution Explorer, is it Windows Phone 8.1? If so, there are not Microsoft.Phone.Tasks namespace anymore. If you want to choose picture, you should use FileOpenPicker.



来源:https://stackoverflow.com/questions/24997435/microsoft-phone-tasks-namespace-is-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!