Firmware Version in code

Is there a way to get the current Firmware Version during run time?

DeviceInformation.Version

@Greg_Norris this is not in docs :slight_smile:

Oh my that was easy. I should have been able to find that.

Looks it is 8byte value made up of 4 16bit Integers.
Major (2)
Minor (1)
Patch (0)
Release or Preview? (3000)

The most recent release being 2.1.0.3.

1 Like
var major = (ushort)((DeviceInformation.Version >> 48) & 0xFFFF);
var minor = (ushort)((DeviceInformation.Version >> 32) & 0xFFFF);
var build = (ushort)((DeviceInformation.Version >> 16) & 0xFFFF);
var revision = (ushort)((DeviceInformation.Version >> 0) & 0xFFFF);
3 Likes