Can Poyrazoğlu
Can Poyrazoğlu

Reputation: 34780

Environment.OSVersion does not exist

I am creating a universal Windows App (Phone and metro) and I need to access the friendly name of the Operating System (such as Windows Phone 8.1). All the sources on the internet point to Environment.OSVersion but Environment does not contain a definition for OSVersion. Am I missing something?

Upvotes: 3

Views: 1272

Answers (1)

the_nuts
the_nuts

Reputation: 6054

I use this to get some stats:

Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

string FriendlyName = deviceInfo.FriendlyName;
string OperatingSystem = deviceInfo.OperatingSystem;
string SystemManufacturer = deviceInfo.SystemManufacturer;
string SystemProductName = deviceInfo.SystemProductName;

Unfortunately, the WindowsPhone is not the full OS version like in Silverlight, it can only be Windows or WindowsPhone

Upvotes: 2

Related Questions