While trying to access the contacts in Windows phone as detailed in this official doc here, I receive the following error:
Error 1 The type or namespace name 'UserData' does not exist in the namespace 'Microsoft.Phone' (are you missing an assembly reference?) C:\Users\XXX\Documents\Visual Studio
2010\Projects\WindowsPhoneDataBoundApplication1\WindowsPhoneDataBoundApplication1\NewSched.xaml.cs 13 23 WindowsPhoneDataBoundApplication1
Specifically the problem is solved when i remove this statement:
using Microsoft.Phone.UserData;
I need that library so that I can access the phone’s contacts. How can this be resolved?
The problem was caused by running the Windows 7.0 SDK. Not the one for 7.1. Installing the Windows Phone 7.1 SDK resolved the issue.