Accessing Custom Item Templates

Visual Studio item templates represent items that a user can add to a project using the Add New Item dialog box. Custom items represented by item templates can be made available to XNA Game Studio projects with a few modifications to the item template.
Detailed documentation of Visual Studio item templates can be found in the Visual Studio 2005 documentation set Creating Item Templates.

Item templates contain a .vstemplate file that provides an XML description of the template. For Xbox 360 projects, XNA Game Studio filters the item template list based on the contents of this file. To make an item template properly compatible with XNA Game Studio projects, add the TemplateGroupID element to the .vstemplate file.

Values for the TemplateGroupID can be "XnaFramework-v2", "XnaFramework-v2-Xbox360", and "XnaFramework-v2-Windows".

  • XNA Game Studio Xbox 360 projects will show templates with a TemplateGroupID of "XnaFramework-v2" or "XnaFramework-v2-Xbox360".
  • XNA Game Studio Windows game projects will show templates with a TemplateGroupID of "XnaFramework-v2" or "XnaFramework-v2-Windows" and a ShowByDefault element with a value of "false".

The following example defines the TemplateGroupID element in the .vstemplate file of an Xbox 360 game-specific item template.

      . . .
      <Description>My custom Xbox 360 C# class.</Description>
      . . .
      . . .

Community Additions