How To Deploy XAP Files to a Windows Phone Device

XAP files are the modern version of the CAB files we used to have back in the Windows Mobile days. Basically, a XAP file is the complied installation file for a Silverlight application. Typically, you would never need to copy this to your device, as you would simply download the application directly from the marketplace. However, if you’ve been invited by a developer to help test their application, or you’re company has a custom built app that you need to load on your device, this is how you’ll do it.

The first thing you need to be aware of, is that not everyone can load an application on their device that doesn’t come from the marketplace. In order to do this, the first thing you need to do is developer unlock the device. There are a ways to do this – the only official way is to signup for Microsoft’s developer program and along with that you will get the ability to developer unlock a few devices. To do this, you’ll need to pay a $100 registration fee to Microsoft. You can learn more about this, and sign up over at Create.MSDN.com.

So now you have a developer unlocked device, and you have your XAP file. Next, you’ll need the Windows Phone SDK too kit. This will provide you with the development environment needed to create new applications. While you may not be creating your own application, we need this SDK installed so we can gain access to the deployment tool. You can find the tools over on here. Download and install the SDK on your computer.

Now that you have the Windows Phone SDK installed, we can deploy that application to your device. First, connect your Windows Phone to your computer and allow the Zune software to do it’s thing. Once the sync is done, close the Zune application. Click Start and type “Application Deployment” (if you’re running Windows 7, otherwise it’s located under Start / Programs / Windows Phone Developer Tools / Application Deployment).

MobileJaw-DeployXAP-WindowsPhone

You will now be presented with the window above. Simply browse and select your XAP file. Make sure the Target is set to “Windows Phone Device” and not to the emulator. Then unlock your device by sliding up the lockscreen and entering your password – if you have a device password. Once unlocked, press the Deploy button and the XAP will be transferred to the device and installed. And – Presto! You’re off and running with your custom app on Windows Phone.

I’ve run into a couple issues with this procedure. It seems that Microsoft has a few bugs lingering in the software. If you do have any weird errors, try and correct whatever the error says is wrong. Also, try disconnecting the device, and then connect it again and allow the sync process to finish before closing Zune and launching the deployment tool. Finally, make sure the device is logged in and sitting at the Today / home screen.  Nothing major here – a little fiddling and you should be off to the races!

About Mike Temporale

Mike Temporale has written 614 posts on Mobile Jaw..

Mike Temporale grew up fascinated by computers since an early age. His first hands on with a computer came when he was 7 years old and a travelling lab of Commodore PET computers made a stop at his school. Hooked on the new world these devices offered, he took any chance possible to get in front of a computer. When Compaq launched the iPaq 3600, he was hooked again. This time on a whole new world of mobile computing. Today, Mike spends his day helping clients deploy and manage their mobile device around the world. From installing custom software, to locking and securing data, and everything in between. He is also the Editor in Chief at Mobile Jaw - a site focused on today's mobile world.

  • Pingback: MobileJaw

  • http://www.techendeavour.com Suresh Babu

    .XAP files are the integral part of the Silverlight application. This post gives the developer to actually make use of the Silverlight application features of cross browser and cross platform in the windows mobile. Thanks for the one stop solution of implementing the .XAP files.

  • vishnu suhas

    Find wp 8 Xap files and deploy tools here –
    http://windowsphonehub.in/apps/

  • karan

    i havea error,,, that is saying that xap file is invalid,,, you know what to do ???