0

On Windows Phone 8.1, in an C# project, I want to get the device ID via -> DeviceExtendedProperties So I might want to do it like

using Microsoft.Phone.Info;
DeviceExtendedProperties.GetValue("DeviceUniqueId");

or

Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");

The problem is, either way didn't compile, I don't know what I'm missing. It says it was supported in WP8.1

This is the error when I use the name space at the top of the file:

using Microsoft.Phone.Info;

error CS0234: The type or namespace name 'Phone' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Same error when I call the function directly

Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
ArielX
  • 113
  • 6
  • If you would like to get useful answers it helps to actually be very thorough when asking your question. A phrase like "didn't pass compile" does not inform us about what the problem is. Please make sure you add the full text of the error to your question. – Alex Apr 11 '15 at 01:14
  • Fixed grammar. Removed smiley faces. – mason Apr 11 '15 at 01:40
  • possible duplicate of [Windows Phone 8.1: DeviceExtendedProperties or DeviceStatus for Device Unique ID](http://stackoverflow.com/questions/27601993/windows-phone-8-1-deviceextendedproperties-or-devicestatus-for-device-unique-id) or [this one](http://stackoverflow.com/q/23321484/2681948) – Romasz Apr 11 '15 at 05:35

1 Answers1

1

I find the answer, Add the namespace at object browser.

anyway, thank you guys for the answer.

ArielX
  • 113
  • 6