0

我意识到 Windows 8 应用程序包含在 Windows 8 包中。是否有一种编程方式来获取 PackageId、安装位置和任何外部依赖项?

4

1 回答 1

0

Yes. You can leverage the Windows Runtime Packaging API.

To start, you can retrieve some PackageVersion information.There is a package version number.

You can read about it here: http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packageversion.aspx

There are various objects that give you additional information.

Package package = Package.Current;
PackageId packageId = package.Id;
PackageVersion version = packageId.Version;

Here are some of the details available:

packageId.Name
version.Major
version.Minor
version.Build
version.Revision
packageId.Architecture
packageId.ResourceId
packageId.Publisher
packageId.PublisherId
packageId.FullName
packageId.FamilyName
package.IsFramework
于 2012-12-01T18:17:33.677 回答