Is there any way to get ID of my application in app store without hardcode? I need to use this value it self, so this way http://forums.create.msdn.com/forums/p/88847/533072.aspx will not help.
try this :
var appId = Windows.ApplicationModel.Store.CurrentApp.AppId;
it's documentation here
A couple of people answered your question in the post that you linked.
One answer is to get the ProductID value from your WMAppManifest.xml file. This value WILL BE your marketplace application ID once the app is submitted. When your app is submitted the value in your WMAppManifest.xml file is changed to be the value for the marketplace. While using this value will not work when testing your app, it WILL work once it has been approved.
The second way to to start the submission process and go to the details page to get the URI for your app.
Use this in your code:
string appID = (from manifest in
System.Xml.Linq.XElement.Load("WMAppManifest.xml").Descendants("App")
select
manifest).SingleOrDefault().Attribute("ProductID").Value;
Keep in mind, you need to add System.Xml.Linq reference and also include the Namespace.
© 2022 - 2024 — McMap. All rights reserved.