Deploy Windows Phone 8.1 apps with the Application Deployment tool

 

Applies to Windows Phone only

You can deploy Windows Phone apps to the emulator or to a phone from Visual Studio. You can also deploy apps by using the Application Deployment tool. This tool is installed when you install the Windows Phone development tools.

The Application Deployment tool has both a standalone version (appdeploy.exe) and a command-line version (appdeploy.cmd). The command-line tool lets you deploy an app from a script or from a custom app.

In this topic

  • Deploying an app with the Application Deployment tool

    • To deploy an app with the Application Deployment tool
  • Deploying an app from the command prompt

    • To deploy an app from the command prompt

    • Command-line deployment syntax and options

    • Command-line deployment examples

Deploying an app with the Application Deployment tool

To deploy an app with a standalone tool, use the Application Deployment tool (appdeploy.exe). This tool is installed when you install the Windows Phone development tools.

To deploy an app with the Application Deployment tool

  1. Build and package your app.

  2. If you’re deploying your app to a device, make sure that the device is registered and connected.

  3. On your computer’s Start screen, find the Application Deployment tool.

    You can also run the tool from the following location:

    C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\AppDeploy.exe

  4. Run the tool.

    The tool starts, as shown in the following screenshot.

    App Deployment Tool for Windows Phone apps

  5. In the Target drop-down list box, select either Device or one of the emulator options.

  6. In the App field, click Browse and locate the package file that you want deploy.

  7. Click Deploy.

If the deployment is successful, the Status field displays App Deployment Complete.

Deploying an app from the command prompt

Use the command-line version of the Application Deployment tool (appdeploycmd.exe) to deploy an app from the command prompt. The command-line tool lets you deploy an app from a script or from a custom app.

To deploy an app from the command prompt

  1. Build and package your app.

  2. If you’re deploying your app to a device, make sure that the device is registered and connected.

  3. Open a Command Prompt window.

  4. If your PATH environment variable doesn’t include the path to AppDeployCmd.exe, navigate to the following folder.

    C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy

  5. Run AppDeployCmd.exe with the options described in the following table.

Command-line deployment syntax and options

AppDeployCmd.exe has the following syntax:

AppDeployCmd.exe <cmd[:param]> <product-id/app filename> <targetdevice[:param]>

The following table describes the command-line options for AppDeployCmd.exe.

You can install or reinstall an app on the target device, or you can update an app that's already installed. To keep data or settings saved by an app that's already installed, use the update options instead of the install options.

Option

Description

<cmd[:param]>

Specifies the command to run. This option has one of the following values:

Option

Description

/install

Installs the app on the target. This option requires the app filename argument.

/installlaunch

Installs and runs the app on the target. This option requires the app filename argument.

/update

Updates the app already installed on the target. This option requires the app filename argument.

/updatelaunch

Updates and runs the app already installed on the target. This option requires the app filename argument.

/launch

Runs the app already installed on the target. This option requires the product-id argument.

/uninstall

Uninstalls the app from the target. This option requires the product-id argument.

/EnumerateDevices

Lists the valid device targets and the numeric index for each device.

<product-id>

Specifies the GUID that identifies the app. This value is found in the app manifest file for the project.

  • For an APPX package, the GUID is the value of the Id attribute of the Application element.

  • For a XAP package, the GUID is the value of the ProductID attribute of the App element.

<app filename>

Specifies the full path of the package to be installed or updated.

<targetdevice[:param]>

Specifies the target device. This option has one of the following values:

Value

Description

xd

Targets the default emulator.

de

Targets the Windows Phone connected to the development computer.

n

Targets the device at index n in the list of devices. To get the list of devices, run AppDeployCmd.exe /EnumerateDevices.

<force[:INTERNAL|SCARD]>

Forces the app to be installed to a specific storage device. You can use this option only with the /install and /installlaunch options.

This option has one of the following values:

Value

Description

INTERNAL

Install the app on the internal storage device on the target.

SDCARD

Install the app on the removable storage device on the target.

Command-line deployment examples

Here are some examples of command-line deployment. The following examples assume that the product-id is f8ce6878-0aeb-497f-bcf4-65be961d4bba and the app filename is D:\PhoneApp2.appx.

  • Installs the app on the default emulator.
    AppDeployCmd.exe /install D:\PhoneApp2.appx /targetdevice:xd

  • Installs the app on the default emulator and then runs it.
    AppDeployCmd.exe /installlaunch D:\PhoneApp2.appx /targetdevice:xd

  • Runs the installed app with the specified Product ID on the connected device.
    AppDeployCmd.exe /launch f8ce6878-0aeb-497f-bcf4-65be961d4bba /targetdevice:de

  • Updates the app already installed on the device specified by device index 2. To get the list of valid devices, use the /EnumerateDevices option.
    AppDeployCmd.exe /update D:\PhoneApp2.appx /targetdevice:2

  • Updates the app already installed on the connected device and then runs it.
    AppDeployCmd.exe /updatelaunch D:\PhoneApp2.appx /targetdevice:de

  • Uninstalls the app with the specified Product ID from the default emulator.
    AppDeployCmd.exe /uninstall f8ce6878-0aeb-497f-bcf4-65be961d4bba /targetdevice:xd

  • Enumerates the list of valid device targets and the numeric index for each device.
    AppDeployCmd.exe /EnumerateDevices