I\'m following the sample code on MSDN (http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.package.id.aspx) to get the current application version
for windows phone 8 ..this works..
String version= XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value;
That API isn't available: if you look closely at MSDN you'll see that this throws an exception for WP8. You'll have to use the same techniques as for WP7.x.
Namely:
See https://stackoverflow.com/a/5680679/694641, WP7 - get compile/build date from code?.