Deploying and testing apps on your Windows Phone

March 06, 2013

Applies to: Windows Phone 8 | Windows Phone OS 7.1

While you’re developing a Windows Phone app, you can use Windows Phone Emulator to deploy and test your app quickly. To experience your app as users will experience it, however, it’s also important to test your app on a phone. This topic describes how to deploy apps to a physical Windows Phone device.

If you have existing apps that targets Windows Phone OS 7.1, we recommend that you test them on a Windows Phone 8 device to ensure compatibility. For more info about possible issues, see App platform compatibility for Windows Phone.

To learn how you can test your app’s behavior under real-world conditions, see Simulation Dashboard for Windows Phone. For general info about debugging, see Debugging apps for Windows Phone.

This topic contains the following sections.

  • Prerequisites
  • Deploying apps to your phone
  • Troubleshooting app deployment to your phone
  • Testing apps that use media APIs on your phone
  • Important differences between the development and release environments
  • Related Topics

Prerequisites

You have to meet the following prerequisites before you can deploy an app to a Windows Phone device:

  • You must be a registered developer. For more info about registering as a developer see, Registration info.

  • Your phone must be registered. For more info, see How to register your phone for development.

  • The phone must be connected to the host computer with the USB cable, turned on, and unlocked.

  • To test apps on a Windows Phone 8 device:

    • The Windows Phone IP over USB Transport service must be running. This service is installed and started when you install the SDK.

    • The computer must recognize the connected device. A Windows Phone 8 phone is listed as a drive in File Explorer.

  • To test apps on a Windows Phone OS 7.1 device:

    • The Zune software must be installed on the host computer. To download and install the Zune software, go to the Zune software download page.

    • Zune must be running. When you connect your phone to the host computer, Zune starts automatically. If Zune does not start, then start it manually.

    • The Zune software must recognize the connected device.

Deploying apps to your phone

You can deploy apps to your phone using Visual Studio or the Windows Phone Application Deployment tool.

Troubleshooting app deployment to your phone

Deploying an app to your phone depends on the local service Windows Phone IP over USB Transport (IpOverUsbSvc). It also depends on the correct installation of your phone as a USB device on the development computer.

To troubleshoot connectivity by checking the IpOverUsbSvc service

  1. Connect the phone to your development computer with the USB cable and unlock the phone’s screen.

  2. Open a command prompt window and run the IpOverUsbEnum command-line tool. You can find this tool in the following folder:

    C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\Bin

  3. Examine the output of the tool.

    • If you see several lines of information about the phone and the services running on it, the deployment problem is probably not a problem with the IpOverUsb service.

    • If you see the message, RPC Server Unavailable. Is the proxy running?, this indicates that the IpOverUsb service is not running. Open the Services snap-in and start the Windows Phone IP over USB Transport (IpOverUsbSvc) service.

    • If you see the message, No connected partners found, check the following things:

      • Is the phone connected to the development computer with the USB cable?

      • Is the phone’s screen unlocked?

      • In File Explorer, is the phone visible as a drive under Computer?

To troubleshoot connectivity by updating the driver

  1. Connect the phone to your development computer with the USB cable and unlock the phone’s screen.

  2. Open Device Manager. Under Portable Devices, locate the entry for the phone.

  3. Right-click on the phone entry and select Update Driver Software. Follow the steps to update the driver.

Testing apps that use media APIs on your phone

When you test an app that targets Windows Phone OS 7.1 on a connected device, usually the Zune software is running. However, you can’t test apps that interact with media APIs while the Zune software is running, because it locks the local media database. To test apps that target Windows Phone OS 7.1 and use media APIs, you can use the Windows Phone Connect Tool to establish a serial or USB connection to the device without running the Zune software. For more info, see How to test apps that use the photo chooser or camera capture task in Windows Phone.

Important differences between the development and release environments

When you deploy an app to the emulator or to a phone from Visual Studio, the networking capability is automatically included. If your app requires networking, however, you still have to specify this capability in the app’s manifest file when you submit the app to the Store. If you don’t specify the networking capability, the app could fail when it’s installed on a user’s phone. For more info, see App capabilities and hardware requirements for Windows Phone.

When you deploy an app to the emulator or to a phone from Visual Studio, the app can write to its installation directory. However an app deployed and published through the Store cannot write to its installation directory. If an app that was installed from the Store attempts to write to its installation directory, an exception is raised. If you include code in your app that writes to the app’s installation folder while you are developing and testing the app, be sure to remove this functionality before you publish your app to the Store.

See Also

Other Resources

How to build and deploy a Windows Phone app using Visual Studio

How to run an app in Windows Phone Emulator