Share via


Create and deploy an application

7/17/2014

The following instructions demonstrate how to create and deploy a C++ application to either the Windows Embedded 8.1 Handheld emulator or a Qualcomm MDP8960 device for testing purposes.

To deploy an enterprise application to a device, see Company app distribution for Windows Phone.

Prerequisites

You must meet the following prerequisites to create and deploy a C++ application to either the Windows Embedded 8.1 Handheld emulator or a Qualcomm MDP8960 device:

  1. Install the Windows Embedded 8.1 Handheld SDK using the installation instructions found in the SDK release notes.
  2. To deploy to an emulator, you’ll need a computer with SLAT and Hyper-V support. The Hyper-V service also needs to be running.
  3. To deploy to a Qualcomm MDP8960 device, the USB port on the device must be configured for default function mode (cfgdbg /F). This means you cannot flash your device using a SelfHostUSBHost image. You must also ensure that the date and time are set correctly on the device and the device is connected to a WiFi network.

Create a sample application

  1. Open Visual Studio 2013.

  2. Go to File > New > Project.

  3. In the New Project dialog box, open Visual C++ > Store Apps > Hub App (or any of the other Windows Phone App template types). Name the project SampleApp, choose a location for the project, and then click OK.

    New Windows Phone Application

Add capabilities

Add capabilities to the app package manifest file as required. For example, if you are going to add the lockdown feature to your sample application, add the ID_CAP_ENTERPRISE_SHARED_DATA capability.

At this time, the Visual Studio 2013 designer does not provide a checkbox for including ID_CAP_ENTERPRISE_SHARED_DATA in the app package manifest. You must manually include capabilities in your manifest file. If your application is a Silverlight application (XAP), see this link for how to update the manifest. If your application is a Windows Runtime App (APPX), then add an XML file named WindowsPhoneReservedAppInfo.xml to the VS Project with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<WindowsPhoneReservedAppInfo xmlns="https://schemas.microsoft.com/phone/2013/windowsphonereservedappinfo">
  <SoftwareCapabilities>
    <SoftwareCapability Id="ID_CAP_ENTERPRISE_SHARED_DATA" />
  </SoftwareCapabilities>
</WindowsPhoneReservedAppInfo>

Deploy to an emulator

  1. Click Build > Configuration Manager to open Configuration Manager.

  2. Verify that the Active solution platform dropdown is set to Win32.

    Configuration Manager

  3. Close Configuration Manager and go to Build > Build Solution to build the project.

  4. Select a Handheld 8.1 image by using the target device drop-down list on the standard toolbar.

    Target the handheld emulator

  5. Press F5 to deploy the application.

    Note

    If Hyper-V is not running, you will be prompted to turn it on. You may also be prompted to provide elevated privileges.

  6. The emulator appears and the application installs and runs.

Deploy to a Device

  1. Go to Build > Configuration Manager to open Configuration Manager.
  2. Verify that the Active solution platform dropdown is set to ARM.
    Configuration Manager
  3. Close Configuration Manager and go to Build > Build Solution to build the project.
  4. Connect the Qualcomm device to your computer by using the USB cable that came with your device.
  5. On your computer, go to the Start screen and select the All applications view.
  6. In the Windows Phone SDK 8.1 group, go to Windows Phone Developer Registration to open the registration application.
  7. Verify that the Status message, located towards the bottom of the dialog box, indicates that a Windows Phone 8 or Windows Phone 8.1 device has been identified.
    Windows Phone Registration
  8. If your device is already registered, you will see an Unregister button. No further action is required.
  9. If your device is not already registered, you will see a Register button. To register the device, click Register.
  10. In the Sign In dialog box, enter your Microsoft account email address and password that is associated with your developer account and sign in.
  11. After your device is successfully registered, the Status message displays: Congratulations! You have successfully unlocked your Windows Phone.
  12. Switch back to Visual Studio 2013 and press F5 to deploy the application to the device.
  13. The application will deploy and begin executing.

Troubleshooting

  • Error code 0x64.
    If you receive an error that the date and time is not set correctly on your device, make sure that the date and time matches that of the computer you have attached the device to. You may also need to click Retry on the Windows Phone Developer Registration window several times.

See Also

Concepts

Develop Applications (Handheld 8.1)