michielpost.nl

Get the application version from the Package.appxmanifest in WinRT

11-07-2012

If you want to get the version of your Windows 8 / WinRT application in code, you can use this method:

public static string GetAppVersion()
{

  Package package = Package.Current;
  PackageId packageId = package.Id;
  PackageVersion version = packageId.Version;

  return string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);

}

This will ge the version from the application manifest file (Package.appxmanifest). This version is also used when submitting your application to the Windows 8 store.

Comments


Laci 23-08-2012
Thanks a lot! Any idea how to get the SystemName, SystemVersion, DeviceType?


LZH 15-12-2014
Is there a way to get the application version from the windows store?


Jevgenijus 26-05-2015
Thanks for solution. LZH: take a look at ApplicationData.Current.Version


So excited I found this article as it made things much quicrek! 12-11-2015
So excited I found this article as it made things much quicrek!


It's a relief to find <a href="http://iexfgnxma.com">soonmee</a> who can explain things so well 13-11-2015
It's a relief to find <a href="http://iexfgnxma.com">soonmee</a> who can explain things so well


This makes evihtyreng so completely painless. http://wskqkbcllvi.com [url=http://ujphvyfcasy.com]ujphvyfcasy[/url] [link=http://mjhlilzpyl.com]mjhlilzpyl[/link] 14-11-2015
This makes evihtyreng so completely painless. http://wskqkbcllvi.com [url=http://ujphvyfcasy.com]ujphvyfcasy[/url] [link=http://mjhlilzpyl.com]mjhlilzpyl[/link]


Suresh B 24-04-2017
Hi, How can i get the latest version available on the store for any UWP app which is running on Windows 10? BR/Suresh


New Comment

Name
E-mail (not published)
Comment
Enter the code shown: