This documentation is archived and is not being maintained.

Deploying a Windows Phone Game

XNA Game Studio 4.0

Describes how XNA Game Studio can copy executable and media files to a Windows Phone emulator or device once you are ready to deploy them. As you develop your Windows Phone game, it is convenient to be able to deploy your game executable to an emulator or your device for testing purposes.

Selecting a Windows Phone Device or Emulator

The active Windows Phone device or emulator for deployment is selected through the XNA Game Studio Device Management toolbar.

Figure 1.  Windows Phone selections in the XNA Game Studio Device Management toolbar


If the toolbar is not visible, on the View menu, click Toolbar, and then select XNA Game Studio Device Management.

The default is the first listed Windows Phone emulator. At this time, the default device cannot be changed.

Deploying Your Game

This procedure shows you how to deploy your Windows Phone game from XNA Game Studio to a Windows Phone emulator or device. This assumes you already have a connection between that device and your computer.

To deploy your Windows Phone game

  1. Ensure there is a connection between the device and your computer.

  2. Load a Windows Phone Game project into XNA Game Studio

  3. On the View menu, click Output, or press CTRL+W, and then press the letter O on the keyboard.

    Ff434571.bp(en-us,XNAGameStudio.40).gifBest Practice
    Ensure the Output window is visible so you can follow the progress of your deployment in detail. If a problem occurs, this information will help you to determine its likely source.
  4. In XNA Game Studio, deploy the game.

    • Right-click the solution name, and then select Deploy Solution.


    • On the Build menu, select Deploy Solution.

    During this process, the Output window shows the deployment progress. You can view a list of the deployed files and some additional information.

    To build, deploy and run your game without debugging, press CTRL+F5.
  5. Start the game from the application list on the device.

Incremental Deployment

When enabled, incremental deployment permits XNA Game Studio to track which files have already been deployed to the device. In subsequent deployments, XNA Game Studio transfers only the files that have changed, or delete files from the device that are no longer part of the project. This limits the time required to redeploy your game to the device.

Incremental deployment for Windows Phone games is not supported in this release of XNA Game Studio 4.0.

Cleaning the Solution Before You Build

Cleaning your game solution before you build removes all intermediate and output files generated by the build. This forces the next build to regenerate everything.

If you select Rebuild on the Build menu, the build automatically regenerates everything. However, you may also want to clean your solution before doing a build. This is particularly true if there are unexpected build errors.

In Microsoft Visual C# Express Edition, the Clean Solution option is not included in the Build menu by default. However, it is easy to add if you want to make cleaning your solution convenient.

To add the Clean Solution option

  1. In XNA Game Studio, right-click the menu or toolbar at the top of the window, and then click Customize.

  2. In the Customize dialog box, click on the Build menu (or on any other menu where you want to add the command).

    This opens the menu, and leaves it open.

  3. In the Customize dialog box, click the Commands tab, and then select Build from the Categories pane on the left.

  4. In the Commands pane on the right, drag the Clean Solution command into the open Build menu, and drop it where you want it.

  5. Close the dialog box.

Now, whenever you want to clean the solution, just click Clean Solution from the menu where you added it.