Deploy Windows Phone apps with the Application Deployment tool
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
Build and package your app.
If you’re deploying your app to a device, make sure that the device is registered and connected.
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
Run the tool.
The tool starts, as shown in the following screenshot.
In the Target drop-down list box, select either Device or one of the emulator options.
In the App field, click Browse and locate the package file that you want deploy.
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
Build and package your app.
If you’re deploying your app to a device, make sure that the device is registered and connected.
Open a Command Prompt window.
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
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:
|
||||||||||||||||
<product-id> |
Specifies the GUID that identifies the app. This value is found in the app manifest file for the project.
|
||||||||||||||||
<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:
|
||||||||||||||||
<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:
|
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:xdInstalls the app on the default emulator and then runs it.
AppDeployCmd.exe /installlaunch D:\PhoneApp2.appx /targetdevice:xdRuns the installed app with the specified Product ID on the connected device.
AppDeployCmd.exe /launch f8ce6878-0aeb-497f-bcf4-65be961d4bba /targetdevice:deUpdates 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:2Updates the app already installed on the connected device and then runs it.
AppDeployCmd.exe /updatelaunch D:\PhoneApp2.appx /targetdevice:deUninstalls the app with the specified Product ID from the default emulator.
AppDeployCmd.exe /uninstall f8ce6878-0aeb-497f-bcf4-65be961d4bba /targetdevice:xdEnumerates the list of valid device targets and the numeric index for each device.
AppDeployCmd.exe /EnumerateDevices