XNA Game Studio Package Utility

The XNA Game Studio package utility compresses your game's built executable and assets into a special compressed format that other XNA Game Studio users can open and play. You may package only XNA Game Studio game projects. The package utility does not support XNA Game Studio library projects.

  • Using Xnapack to Package a Game
  • Using Xnapack to Unpack a Packaged Game

Using Xnapack to Package a Game

xnapack assembly[platform] [/archive:] [/nologo] [/output:file] [/quiet] [/thumbnail:file]

Option Description

assembly

The startup assembly of your project. This is the .exe built by your XNA Game Studio project.

[platform]

Deprecated and optional. Specifies the platform for which the project is built. This value can be Windows, Xbox 360, or Windows Phone, and must match your game's project type.

/archive:

Specifies an archive file (for example, a Windows Phone .xap file) that contains the complete game package. By default, all files at the same location as the startup assembly will be included in the created package. This option limits the package to the specified archive file. (Short form: /a:)

/nologo

Suppresses logo/copyright messages.

/output:file

Specifies the path and file name of the output file. By default, your game is created in the same folder as the startup assembly with the same name. (Short form: /o:)

/quiet

Suppresses all non-error messages.

/thumbnail:file

Specifies the path to an optional thumbnail that is displayed with your game. (Short form: /th:)

For a Windows game, this thumbnail appears in the graphical unpacking utility.

For an Xbox 360 game, the thumbnail also appears in the Game Library.

For a Windows Phone game, the thumbnail appears in the Games list.

The following example packs a Windows game called MyWinGame and suppresses the logo/copyright messages.

xnapack MyWinGame.exe /nologo

Using Xnapack to Unpack a Packaged Game

xnapack unpack package[platform] [/listplatforms] [/listtargets] [/nologo] [/platform:name] [/quiet] [/run] [/showui] [/target:name]

Option Description

package

An XNA Framework game package, previously created with the XNA Game Studio package utility.

If the game is intended for the Xbox 360 console, see Connecting to Your Xbox 360 with XNA Game Studio 4.0 Refresh for information about adding registered consoles to your computer.

[platform]

Deprecated and optional. Specifies the platform for which the project is built. This value can be Windows, Xbox 360, or Windows Phone, and must match your game's project type.

/listplatforms

Lists the platforms that support the App Hub game package.

/listtargets

Lists the platform instances for a given platform. Must be used with /platform option.

/nologo

Suppresses logo/copyright messages.

/platform:name

Specifies the platform to which the game package is being deployed. Required if the package supports more than one platform and the target cannot be resolved.

/quiet

Suppresses all non-error messages.

/run

Runs the game once installation is complete. Applies only to Xbox 360 and Windows Phone games.

/showui

Displays the user interface for confirming and copying files.

/target:name

Specifies the named platform instance to which the game package is being deployed. If no platform instance is specified, the default target is used. For a list of available targets, use the /listtargets option.

Ff434644.note(en-us,XNAGameStudio.41).gifNote
For Windows Phone game packages, the default target is the Windows Phone emulator that is installed as part of the Microsoft Windows Phone SDK. To deploy to a Windows Phone device, use this option to specify the device.

The following example unpacks an App Hub game package containing a Windows game called MyWinGame, and suppresses all non-error messages.

xnapack unpack MyWinGame-Windows.ccgame /quiet