Platform-Specific Content Projects

Describes how XNA Game Studio supports maintaining platform-specific game assets through the use of multiple content projects within a game project.

A cross-platform solution in XNA Game Studio is composed of multiple game projects, with one project for each platform. The projects are synchronized with each other such that adding or renaming a file in one project is reflected automatically in the other projects.

Content projects that are added to a game project follow the same synchronization rules. This means that adding a content project to one game project will automatically add the same content project to all other game projects in the XNA Game Studio solution. For each of the other projects, all references to XNA Framework assemblies will be appropriate for the project's platform.

It may be useful to maintain a content project that is exclusive to a game project, such as for game assets that are specifically meant for use on that project's platform. For example, you may want to use high-resolution bitmaps for a project that will run on the Windows platform, but use low-resolution versions for the Zune project.

To create content projects that are not synchronized with other game projects, you must first add a content project to the needed game project, and then remove the synchronized projects in the game projects where they are not needed.

To create an exclusive content project for a Windows game

This example procedure assumes that the XNA Game Studio solution contains three game projects: for Windows, Xbox 360, and Zune.

  1. In Solution Explorer, right-click the Windows game project node (for example, MyGame).
  2. Click Add, and then click New Content Project....
  3. In the Add New Content Project dialog box, enter the name for the new content project (for example, MyWindowsContent).
  4. In Solution Explorer, expand the Xbox 360 game project node (for example, Xbox 360 Copy of MyGame).
  5. Within the Xbox 360 game project, right-click the new content project (MyWindowsContent), and select Remove.
  6. In Solution Explorer, expand the Zune game project node (for example, Zune Copy of MyGame).
  7. Within the Zune game project, right-click the new content project (MyWindowsContent) and select Remove.

Community Additions