Get the version of your WinRT Package

It might sound strange, but I couldn’t find any place on how to get the version number of the WinRT Package. I want to use the Major and Minor version number parts as part of a HTTP Request. It’s simpler than in the Windows Phone world.

using Windows.ApplicationModel;

PackageVersion version = Package.Current.Id.Version;
string versionString = string.Format("{0}.{1}",version.Major, version.Minor);


Wow this was a small post!