In C# one can use System.Version.Assembly to get the version of a running app. However this doesn\'t appear to exist in Silverlight for Windows Phone. Is there an alternat
public static string GetAsemblyVersion()
{
return Convert.ToString(Assembly.GetCallingAssembly().GetName().Version);
}
If you have moved over to Windows Phone 8, you can simply use the newer PackageId class:
var version = Package.Current.Id.Version;
Windows Phone 8.1:
using System.Reflection;
// ...
Version version = typeof(MainPage).GetTypeInfo().Assembly.GetName().Version;
You can use the GetExecutingAssembly method and the AssemblyName class to find this information.
var nameHelper = new AssemblyName(Assembly.GetExecutingAssembly().FullName);
var version = nameHelper.Version;
var full = nameHelper.FullName;
var name = nameHelper.Name;
Simply use this line to get the Application Name and Id, publisher name etc...
string name = Windows.ApplicationModel.Package.Current.DisplayName;