13

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.

meneses.pt
  • 2,588
  • 3
  • 27
  • 38

1 Answers1

29

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);
Romasz
  • 29,662
  • 13
  • 79
  • 154