Prerequisites for XNA Framework games
To get started, refer to the MSDN documentation topic named Sharing and Distributing Your Game - specifically:
- Dependencies for 1.0
- Dependencies for 2.0
- Dependencies for 3.0
- Dependencies for 3.1
- Dependencies for 4.0
- The dependencies FAQ
Creating an installer for games built with XNA Game Studio Express 1.0 and XNA Game Studio 2.0
Deploying games created with XNA Game Studio Express 1.0 and XNA Game Studio 2.0 has the following limitations:
- ClickOnce (invoked by choosing the Publish command in Visual Studio) will not work.
- Visual Studio setup projects will not work by default and require some additional steps. Paul Stubbs documented a way to do this for XNA Game Studio 2.0, but it relies on URLs which are known to change. MikeTrejo also documented a way in a forum post.
Both of the above options will try to determine the dependencies and will miss most of them. They will also try to include parts of the XNA Framework and DirectX which should not be distributed that way (see the XNA Framework and DirectX EULAs).
The only way to deploy games created with XNA Game Studio Express 1.0 and XNA Game Studio 2.0 is to create your own installer package and add in the dependencies and call their installers (see below for some tools that can help create this type of installer) - or - ask your end users to manually install the dependencies and then provide them the contents of the \bin\release\ folder to run directly.
Alternatively, if you know your end users will have XNA Game Studio installed, you can use XnaPack to create a .ccgame file.
Creating an installer for games built with XNA Game Studio 3.0, 3.1 or 4.0
XNA Game Studio 3.0, 3.1 and 4.0 support ClickOnce deployment, and they also include Visual Studio bootstrapper packages that can be used to install the XNA Framework Redistributable 3.0, the XNA Framework Redistributable 3.1 and the XNA Framework Redistributable 4.0. You can learn more about game deployment in XNA Game Studio 3.0, 3.1 and 4.0 in the following links:
- XNA Game Studio 3.0 documentation
- XNA Game Studio 3.1 documentation
- XNA Game Studio 4.0 documentation
- ClickOnce documentation
- Introductory blog post
Other tools for creating installers
There are several tools available that can be used to create installers. Here are some options:
- WiX - creating an MSI for an XNA Framework game
- Inno Setup - http://forums.xna.com/thread/2828.aspx or http://www.gamedev.net/community/forums/topic.asp?topic_id=498463
- XNAInstaller - http://www.codeplex.com/xnainstaller or http://www.nuclex.org/installer
- Using the Visual Studio bootstrapper to install XNA Framework game dependencies
- NSIS (Nullsoft Scriptable Install System)
If you have worked out steps to do it with other installer tools not listed above, please let us know and we will add a link here.