A couple developers I have been working with have had a problem with their application crashing during certification testing, or their app not working as expected after being published. This problem was difficult to debug since the app worked fine for the developer, but would crash out of the gate during testing. After some investigation, we found that the developer was relying on the Product ID to be a known value.
The Product ID is a GUID used to identify your application in the Windows Phone installed application list. This value stays the same across application updates. The Product ID is not controlled by the developer, but is assigned during the ingestion process. That is, the value created by Visual Studio and stored in WMAppManifest.xml, is not the value that will be used when the application is published.
If you are relying on the Product ID to be a certain value – it won’t be what you expect, when your application is published.
<App xmlns="" ProductID="{eb186f6f-78ab-49d2-937d-daa5d0cb7889}" Title="BestAppEver" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="BestAppEver author" Description="Sample description" Publisher="Cookie1">
<App xmlns=""
ProductID="{eb186f6f-78ab-49d2-937d-daa5d0cb7889}"
Title="BestAppEver" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"
Author="BestAppEver author" Description="Sample description" Publisher="Cookie1">
Here are a couple of workarounds to consider:
To see the Product ID as assigned by Product ID, in your “my apps” list on the dashboard, click on the name of your submission.
Here, you can see the Product ID and the Deep Link. This will not change for this submission.
Code to read the Product ID at run time:
public static string GetProductId() { System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load("WMAppManifest.xml"); var appElement = (from manifest in xml.Descendants("App") select manifest).SingleOrDefault(); if (appElement != null) { return appElement.Attribute("ProductID").Value; } return string.Empty; }
public static string GetProductId()
{
System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load("WMAppManifest.xml");
var appElement = (from manifest in xml.Descendants("App") select manifest).SingleOrDefault();
if (appElement != null) {
return appElement.Attribute("ProductID").Value;
}
return string.Empty;
Page rendered at Thursday, February 23, 2012 2:51:12 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. All sample code is provided AS IS without warranty of any kind.