HomeWindowsHow to Get the Windows Phone App version from WMAppManifest file ?

How to Get the Windows Phone App version from WMAppManifest file ?

This blog post will explain how to get the Windows Phone App version from the WMAppManifest file using C# in Windows Phone 8.

The WMAppManifest file contains the configurations items related to the Windows Phone app. It includes the following tabs
– Application UI
– Capabilities
– Requirements
– Packaging

The Packaging tab contains the Version Number of the App.

image

How to Get the Windows Phone App version from WMAppManifest file ?

The WMAppManifest file is just an XML file and hence we can use the XDocument class to retreive this element from the file.

Below is a sample code snippet which retreives the App version number from WMAppManifest.xml using XDocument.

private void Button_Click_1(object sender, RoutedEventArgs e)
{
  string appVersionNumber = XDocument.Load("WMAppManifest.xml")
         .Root.Element("App").Attribute("Version").Value;
  MessageBox.Show(appVersionNumber);
}

image

    1 Comment

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...