Getting the Current Windows Phone App Version in code.


It’s often useful to display the current App version (per your App Manifest) for support purposes.  I came across the following snippet that looks to provide the easiest option that requires no manual updates when you release a new version of your app:

VersionTextBox.Text = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value;

I usually use this in my about box similar to this (add a textbox named VersionTextBox to your xaml first):



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s