Floating FB popout byF5debug

101 How to on Windows Phone – How to #89 – How to Deploy a Windows Phone application from Command Prompt


In this article we are going to see how to deploy a windows phone application directly from command line version of the Application Deployment Tool. In our earlier article we have seen how to deploy the application directly using the Application Deployment Tool standalone application that comes in the package with both the versions of the SDK. Application Deployment command line tool (XapDeployCmd.exe) will be installed only with the Windows Phone 8 SDK and not with the earlier versions.   [more]

The Application Deployment Command Line tool for Windows Phone will be installed automatically while installing the Software Development Kit in the location C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XAP Deployment This tool will work only with the Visual Studio 2012 Update 2 package and not with the normal Visual Studio 2012 version. With this tool the app can be deployed easily from the command prompt with simple tags. Let us see how we can use this tool to deploy the same package which we used in our earlier article.

Navigate to the application build folder and see if the package is available (which is the .XAP file) if not try to build the application through one of the ways which we discussed earlier. If you are planning to deploy the application to the device make sure to connect the device using the USB to the developer machine else to check with the emulator we can directly run the application from the command line. Let us see the steps on how to use the Application Deployment Command Line tool to deploy our application to the emulator.

Steps to deploy the application:

Open command prompt in administrator mode and navigate to the path C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XAP Deployment where the xapDeployCmd.exe is installed as shown in the screen below.


The syntax that to be used to deploy to the emulator and to the physical device are as follows.  Basically to deploy  your app to the emulator we need to use xd and for physical device de option as shown in the syntax below.


XapDeployCmd.exe <cmd[:param]> <Product ID/Xap FileName> <targetdevice[:param]>

in the syntax first parameter is the command to process, second is the path to the XAP file or the product id which we can get from the application deployment and final parameter is the target device which can be an emulator or the physical device. Use the below codes to deploy the application to device and emulator as per your requirement.

Deploy to Emulator:

XapDeployCmd.exe /installlaunch G:\MyWork\Learning\F5debugHowto85\F5debugHowto85.xap /targetdevice:xd


Deploy to Device:

XapDeployCmd.exe /installlaunch G:\MyWork\Learning\F5debugHowto85\F5debugHowto85.xap /targetdevice:de


About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

  • Comment
  • Preview

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters


This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter