Raj
Raj

Reputation: 3061

Windows phone: Accessing contacts

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?

Upvotes: 0

Views: 561

Answers (2)

Raj
Raj

Reputation: 3061

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.

Upvotes: 1

Jac
Jac

Reputation: 1090

You probably need to add a reference to the assembly, like the error message suggests. This page is not an exact guide, but should get you there: http://msdn.microsoft.com/en-us/library/cc838164%28v=vs.95%29.aspx#adding_a_silverlight_library_assembly

Upvotes: 0

Related Questions