Is it possible to get the version of the app while it's running?
In a Windows desktop application I can get it as follows:
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
But GetExecutingAssembly()
isn't available in Windows Phone 8.1.
Is there another way?
This is how:
PackageVersion pv = Package.Current.Id.Version;
Version version = new Version(Package.Current.Id.Version.Major,
Package.Current.Id.Version.Minor,
Package.Current.Id.Version.Revision,
Package.Current.Id.Version.Build);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With