Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Game Content Project

A project type (nested within a standard XNA Game Studio 2.0 project) designed to store all content for a game application.

Overview

A game content project builds game content (models, textures, sounds, and so forth) using the XNA Framework Content Pipeline. Content is added to this project as a project item and item properties define how each content item is imported and processed as part of the build operation. Game content projects are automatically built whenever their parent project is built. In addition, their configuration and platform are the same as their parent project.

Game content projects have a References node that lists the assemblies and projects containing the importers and processors currently used in a Content Pipeline build. Individual content items are listed and their properties are accessible using the Properties window. Items can be added to a game content project using either the standard Add New Item or Add Existing Item dialog boxes.

Bb976064.caution(en-US,XNAGameStudio.20).gifCaution
The Build Action property of any project item moved into the nested content project is automatically set to Compile. This value persists even if the same item is later moved out of the nested content project.

Property Pages

Game content projects have a subset of the project property pages associated with a standard XNA Framework game project. Access these properties by right-clicking the Content node in Solution Explorer and choosing Properties.

Build Property Page

Specifies the output path for the compiled content of your game.

Build Events Property Page

Use the Build Events page to specify build configuration instructions. You can also specify the conditions under which any post-build events are run.

Reference Paths Property Page

Specifies the folder path for assembly references used by the nested content project of your game.

Code-Only Builds

By manually editing a .csproj file, you can build your game project without also building the nested content project. If you are using XNA Game Studio, open the related .csproj file and add the following property:

      <SkipNestedContentBuild>true</SkipNestedContentBuild>
    

If you are building from the command-line, use the following command to skip the nested content project:

Msbuild /p:SkipNestedContentBuild=true WindowsGame1.csproj

For more information on using MSBuild with project files, see How To: Edit Project Files and Visual Studio Integration (MSBuild).

In addition, you can build only the nested content project from the command-line by invoking MSBuild directly on the .contentproj file of your nested content project.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.