No, AppId
and PackageId
not identical.
As you can see, AppId
is a Guid
structure, and PackageId
is a class. AppId
is created in the Windows Store when your application is certified to be written to the Windows repository, and PackageId
contains package identification information, such as name, version and publisher, which can be found in the appx manifest.
Since AppId
is associated with Windows repository, so the first time you are trying to get it, it may take some time. But it will not be too long, in my test it is about 1 second. After that, when you try to get the AppId
, it will be very fast. (I think it was saved on the local machine, since its value is invariant.)
However, if you want to run the product details page (PDP) for the product. The product identifier is recommended for clients on Windows 10. And the product identifier is not an AppId
.
To get the product ID, Launch the Windows Store app :
These values ββcan be found in the Windows Dev Center toolbar on the App identity page in the application management section for each application.
To get this programmatically, we can try to use the CurrentApp.LinkUri property, this property returns the URI of the application list page in Windows Store as:
https://www.microsoft.com/store/apps/<your app Product ID>
.
The product identifier is also invariant, so I think you can just find it in the Windows Dev Center toolbar and make it hard code in your application.