Reputation: 2616
Does anyone know how to get the application version in a Windows Universal app?
There used to be a way reading the xap xaml information in Windows Phone Silverlight apps, but as this changed I can't seem to find a new way of doing this.
Upvotes: 14
Views: 6871
Reputation: 29792
You can read version from Package.Id. There you will find: Major, Minor, Build and Revision numbers of your app:
string appVersion = string.Format("Version: {0}.{1}.{2}.{3}",
Package.Current.Id.Version.Major,
Package.Current.Id.Version.Minor,
Package.Current.Id.Version.Build,
Package.Current.Id.Version.Revision);
Upvotes: 30