Upgrading Windows Phone 7 Projects to April CTP

by Nick 30. April 2010 14:07

If you open a Windows Phone 7 project that was created with the initial release of the developer tools you will see a prompt similar to:

image

Essentially one of the updates in the April CTP is related to the enforcement of security policies for applications that want to make use of device capabilities. I’m expecting that this will be integrated into the Marketplace experience so that users who download your application will have to acknowledge that the application will have access to capabilities on the device.

Anyhow, to get your application to run, you may need to add the appropriate capabilities, as instructed in the warning message. From the previous release of the dev tools, your WMAppManifest.xml file (located under the Properties node of your Windows Phone 7 project) probably looks similar to the following:

<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0">
  <App xmlns="" ProductID="{b2a3afee-70be-40c7-8dc1-81ac8c14163e}" Title="Notifications" RuntimeType="SilverLight" Version="1.0.0.0" Genre="NormalApp"  Author="" Description="" Publisher="">
    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
    <Capabilities>
    </Capabilities>
    <Tasks>
     ...

Note that the Capabilities section is empty. Update this with the list of capabilities your application requires – you don’t need to include all of them but you may want to start by including all of them to make sure your application runs. Before you submit your application to marketplace (when we’re able to do so) I would recommend that you trim back on all the capabilities that you don’t require. After adding the capabilities your manifest file should look similar to:

<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.0">
  <App xmlns="" ProductID="{b2a3afee-70be-40c7-8dc1-81ac8c14163e}" Title="Notifications" RuntimeType="SilverLight" Version="1.0.0.0" Genre="NormalApp"  Author="" Description="" Publisher="">
    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
    <Capabilities>
      <Capability Name="ID_CAP_NETWORKING" />
      <Capability Name="ID_CAP_LOCATION" />
      <Capability Name="ID_CAP_SENSORS" />
      <Capability Name="ID_CAP_MICROPHONE" />
      <Capability Name="ID_CAP_MEDIALIB" />
      <Capability Name="ID_CAP_GAMERSERVICES" />
      <Capability Name="ID_CAP_PHONEDIALER" />
      <Capability Name="ID_CAP_PUSH_NOTIFICATION" />
      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
    </Capabilities>
    <Tasks>

Jaime Rodriguez has a good post on Windows Phone 7 capabilities security model

Tags: , ,

Powered by BlogEngine.NET 2.0.0.36

Automotive Theme by Car Leasing Experts

 

Page List