Reputation: 4223
How do I get a installed Metro app version from a desktop application?
Upvotes: 0
Views: 377
Reputation: 6242
A little correction for Vinicius's answer. Correct order of version numbers is major, minor, build (not revision), revision.
Upvotes: 1
Reputation: 4223
I found the answer here: http://weblogs.thinktecture.com/cnagel/2012/10/calling-winrt-from-windows-desktop-apps.html
var pm = new PackageManager();
IEnumerable<Package> packages = pm.FindPackages();
foreach (var package in packages)
{
if (package.Id.FullName.Equals("X"))
{
Console.WriteLine("Architecture: {0}", package.Id.Architecture.ToString());
Console.WriteLine("Family: {0}", package.Id.FamilyName);
Console.WriteLine("Full name: {0}", package.Id.FullName);
Console.WriteLine("Name: {0}", package.Id.Name);
Console.WriteLine("Publisher: {0}", package.Id.Publisher);
Console.WriteLine("Publisher Id: {0}", package.Id.PublisherId);
Console.WriteLine("Version: {0}.{1}.{2}.{3}", package.Id.Version.Major, package.Id.Version.Minor, package.Id.Version.Revision, package.Id.Version.Build);
Console.WriteLine();
}
}
Upvotes: 2
Reputation: 23
I am not sure what you are asking exactly. But if you search a desktop app in marketplace is possible that is just develeped or you can use and install the desktop app like in windows 7 or windows XP.
Upvotes: 0