Though some of the features are pretty straight forward, some of them require having hooks all over the place. So I try to find fully working examples. Recently I came across a sample app that creates a statistics page that can be used to display information for an About’s page. The good thing was that it was simple and there was no extraneous items to distract the developer. Unfortunately, copying the C# and XAML to a new page in one of my apps caused the app to fail with an ArgumentNullException error. The suggested tip was to use the NEW keyword. Except for the name of the pages, the new XAML and C# pages appeared to be identical. Since this was a very simple example, there was not too many other places to look and they appeared to be identical. Thanks to my friend Peter Henry,he told me to add
to the Capabilities in the WMAPPManifest.xml. For some reason, I only considered these to be comments that were need to have the app validated for the marketplace. It had not dawned on me that these really affected the generated code.
Another lesson learned.
John Marshall… Visio MVP Visio.MVPs.org
One thought on “WP7 Full samples May Not Be Enough”
I hear that PHenry guys just a coffee swilling pro-MSer, WP7 pushing geek? DOH! :>
But seriously, in the beginning (WP7 beta) I believe your assessment was right, those Capability entries were there for Marketplace entry and consumer notification/benefit only. Somewhere between the first beta and now (I think it was with one of the 7.0 SDK updates), the Capabilities were enforced in the compiler/emulator. That might explain why the original code worked (in 7.0 betas?) but not now in your updated, Mango 7.5 SDK code. (yes, I’m stretching and looking for the silver lining :>).
The GREAT news though is, YOU FIXED IT! :> You figured it out, fixed it, and blogged about it for others like you to learn! KUDOS!
Comments are closed.