locked
[WP8.1]How to get App version? RRS feed

  • Question

  • Hi

    I tried to get the version of my app.I set the version to 1.0.0.1

    After i rebuild the app,

     The Following Code returns 1.0.0.0
    using System.Reflection;
    
    // ...
    
    Version version = typeof(MainPage).GetTypeInfo().Assembly.GetName().Version;
    Friday, February 26, 2016 9:45 AM

Answers

  • Package thisPackage = Package.Current;
    PackageVersion version = thisPackage.Id.Version;
    string Version = version.Major + "." + version.Minor + "." + version.Build + "." + version.Revision;

    Friday, February 26, 2016 10:25 AM