Deploying a Zune Game
Describes how XNA Game Studio can copy executable and media files to a Zune device once you are ready to deploy them. As you develop your Zune game, it is convenient to be able to deploy your game executable to your device for testing purposes.
However, before deploying, you need to use the XNA Game Studio Device Center dialog box to establish a connection between the device and your computer.
Note |
|---|
| For more information about troubleshooting deployment to your Zune device, see Troubleshooting Zune Game Deployment. |
Deploying Your Game
This procedure shows you how to deploy your Zune game from XNA Game Studio to a Zune device. This assume you already have a connection between that device and your computer.
To Deploy Your Zune Game
- Load a Zune Game project into XNA Game Studio.
-
In XNA Game Studio, deploy the game by either right-clicking the solution name and then selecting Deploy Solution, or, from the Build menu, selecting Deploy Solution.
During this process, both the Output window of XNA Game Studio and the Connect to Computer screen show the deployment progress by displaying a list of the deployed files and other information. Also, you can see the names of the files on the device screen as they are deployed.
- Select the top level Games menu on the device to start the game.
Incremental Deployment
Incremental deployment is enabled automatically for XNA Game Studio projects. This means that the IDE tracks which files have already been deployed to your device. Subsequently, it only deploys updated files. Also, if a file that was part of the previous deployment is no longer in the game, that file is deleted from the console during deployment. (This applies only to previously-deployed files, not to files generated on the device.) The output window reflects exactly what actions were taken during deployment.
A full deployment, which deletes any previous game files and copies the entire game to the device, is triggered by the following conditions:
- This is the first time the project has been deployed.
- A different configuration is used than in the last deployment to this device.
- The last deployment to the device was from a different source than the currently loaded solution—a source such as a copy on another Windows-based computer or a .ccgame package.
- The game was deleted from the device since the last deployment.
- The solution has been cleaned since the last deployment. (For more information about cleaning the solution, see the "Cleaning the Solution Before You Build" section that follows.)
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 you are experiencing 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
-
In XNA Game Studio, right-click the menu or toolbar at the top of the window, and then click Customize.
-
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.
-
From the Customize dialog box, click the Commands tab, and select Build from the Categories pane on the left.
-
From the Commands pane on the right, drag the Clean Solution command into the open Build menu, and drop it where you want it.
-
Close the dialog box.
Now, whenever you want to clean the solution, you can click Clean Solution from the menu where you added it.
Managing Several Zunes with XNA Game Studio Device Center
Using the XNA Game Studio Device Center dialog box, XNA Game Studio supports deployment and debugging on multiple Zune devices.
The XNA Game Studio Device Center does the following:
- Creates connections between your Windows-based computer and each of your Zune devices. Each connection allows you to deploy and debug XNA Framework 3.1 games to a specific Zune device.
- Manages the list of available Zune devices, allowing you to add and delete devices from the available deployment list.
- Allows you to set the default Zune device to use for deployment. Similar to the default printer in Microsoft Windows, the default Zune is the device to which XNA Game Studio will deploy unless you specifically select a different Zune device for deployment. If there is only one Zune device, it is set as the default device.
- Stores the list of Zune devices on a per-user basis. Each user has a list of different Zune devices to which he or she can select for deployment, and a different default device to use for deployment.
XNA Game Studio installs the XNA Game Studio Device Management Toolbar into Visual Studio. The XNA Game Studio Device Management Toolbar does the following:
- Gives you easy access to the XNA Game Studio Device Center dialog box from within Visual Studio by clicking the Launch XNA Game Studio Device Center button.
- Allows you to choose a specific Zune device to deploy by using the XNA Game Studio Deployment Device drop-down list. Use this if you want to deploy to a Zune device other than your default device.
The XNA Game Studio Device Management Toolbar automatically appears within Visual Studio when an Xbox 360 (or Zune) Game project or Xbox 360 (or Zune) Library project is loaded in supported versions of Visual Studio tools.
Note |
|---|
| If your startup project is not an Xbox 360 or Zune project, most of the toolbar buttons will be unavailable. To make these buttons available, change your startup project to a Zune Game or Library project. |
For more information about using the features of XNA Game Studio Device Center, see Using XNA Game Studio Device Center.
Note