我有一个Windows 8通用项目,并具有获取APP ID的功能, 以下功能在Windows Phone 8.1中运行良好
Platform::Guid appId = Windows::ApplicationModel::Store::CurrentApp::AppId;
然而,它在Windows Phone 10中花费了大约40秒。
从MSDN开始,只有元数据不同,
我可以知道它是由元数据引起的吗?以及如何解决?
答案 0 :(得分:0)
要使用AppID
而不是Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current;
Windows::ApplicationModel::PackageId^ packageId = package->Id;
Windows::ApplicationModel::PackageVersion version = packageId->Version;
Platform::String^ output =
"Name: \"" + packageId->Name + "\"\n" +
"Version: " + version.Major.ToString() + "."
+ version.Minor.ToString() + "."
+ version.Revision.ToString() + "."
+ version.Build.ToString() + "\n" +
"Architecture: " + packageId->Architecture.ToString() + "\n" +
"ResourceId: \"" + packageId->ResourceId + "\"\n" +
"Publisher: \"" + packageId->Publisher + "\"\n" +
"PublisherId: \"" + packageId->PublisherId + "\"\n" +
"FullName: \"" + packageId->FullName + "\"\n" +
"FamilyName: \"" + packageId->FamilyName + "\"\n" +
"IsFramework: " + package->IsFramework.ToString();
,您可以使用以下代码
Output:
Name: "f3e02737-ddfa-47a0-a837-37ee53459898"
Version: 1.0.0.0
Architecture: Arm
ResourceId: ""
Publisher: "CN=heefan"
PublisherId: "gsbawe9kfjm1p"
FullName: "f3e02737-ddfa-47a0-a837-37ee53459898_1.0.0.0_arm__gsbawe9kfjm1p"
FamilyName: "f3e02737-ddfa-47a0-a837-37ee53459898_gsbawe9kfjm1p"
IsFramework: false
来自设备的示例输出
AppID
我也不知道为什么www.sitename.com/post-title
需要很长时间来计算。