Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get app version in Windows Universal App?

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.

like image 825
meneses.pt Avatar asked Aug 05 '14 16:08

meneses.pt


1 Answers

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);
like image 126
Romasz Avatar answered Oct 04 '22 17:10

Romasz