Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Phone.Tasks namespace is not available

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

enter image description here

In the properties windows of the project I see:

Target: Windows Phone 8.1

Am I missing an assembly reference or something?

like image 277
Andrei Avatar asked Jul 28 '14 14:07

Andrei


2 Answers

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

like image 134
Vivek Maskara Avatar answered Nov 13 '22 11:11

Vivek Maskara


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.

like image 27
Chris Shao Avatar answered Nov 13 '22 10:11

Chris Shao