Marketplace Test Kit – Application Capabilities
I thought I would share this gotcha to save you some headache and potentially another round of Marketplace testing.
I recently submitted an application to the Windows Phone Marketplace for testing and to my complete surprise it came back reporting a failure.
In fact it was a very serious failure relating to the application terminating with an unhandled exception when viewing a page with the Web Browser control. I had tested the application thoroughly on multiple devices and the emulator to which I could not replicate the error sent from the Marketplace Test team.
After some investigation using the Marketplace Test Kit I noticed something rather strange where the reported capabilities for the phone were wrong. Even though I was using the Web Browser control within one of my application pages it was reporting that the following capability was not required:
With a little help from @paulfo and the guys at Microsoft they informed me that the Capability Tool only parses the assemblies and not XAML to establish the application capabilities. So this meant if my Web Browser control was not declared in the generated code behind it would not be picked up by the capabilities tool.
So to simply fix this issue I needed to add the x:Name attribute as follows:
Incorrect:
Correct:
Now the toolkit reports the application requires the ID_CAP_WEBBROWSERCOMPONENT.
Note:
The reason I don’t need to give the web browser control a name within my XAML is because I am using the MVVM pattern where my code is not within the code behind of the XAML.
