Created: January 2011
Last Updated: January 2011
Publishing with Visual Studio
Remark: If any of the discussed windows are not opened in your Visual Studio IDE, then you may open them by going to the "View" drop-down menu, which is found at the top-left of the IDE. If you receive any problems during the publishing steps or if your content files are not published in your specified directory, then please visit Troubleshooting Visual Studio.
In the Solutions Explorer, right-click the project and choose "Properties" from the context-menu. See the following image for clarification, where the project is circled in black.
(Recommended Step) You should see a page with tabs to the left of it much like the one in the picture. Go to the "Publish" tab.
The purpose of this step is to include the necessary installer components for running your game. Click on the "Application Files..." button and change the "publish status" of all the items to "include". This will include the components with your installer (which increases the installer size). Exit the pop-up window that showed up after clicking the "Application Files..." button.
The purpose of this step is to customize the user installation experience. Click on the "Options Button...". Uncheck and/or check any items according to your choice. Our recommendations are as follows: 1) uncheck every item from every section in the pop-up window, 2) go to the "manifest" section, and 3) put a check for "Use application manifest for trust information" and "Create Desktop shortcut".
Go to the "Signing" tab. Click on the "Select from Store...". From the pop-up window, pick a certificate of your choice, but any selection that will allow you to publish without issues will do.
Go to the "Build" tab. At the top, for the "Configuration" drop-down menu, you may want to choose "Release" instead of "Debug". Note that the values in the "Conditional compilation symbols:" text box may be different between the release and debug version. Assuming your debug version compiles and runs, you may need to include the symbols (i.e. texts) found in the debug version in the release version in order for the release version to compile and run without any problems. The symbols should be delimited by a ";" (semicolon).
Now, right-click your project from the Solutions Explorer and choose "Publish..." from the context-menu. Follow the wizard to publish your game.
Further Remarks
A FlatRedBall project requires only DirectX 9.0c, the XNA 3.1 redistributable, and the .Net 3.5 SP1 framework installed to run on an end-user's PC. These components are included with the prerequisites installer found on the official FlatRedBall website at http://www.flatredball.com/frb/docs/?title=Download_the_FRB_Engine_and_Components. Hence, after a client has all of these components installed on their machine, they will be able to play your game (even without installing your game).
It is common that an end-user will have the DirectX 9.0c and .Net 3.5 SP1 framework already installed on their machine. Hence, it is possible to include the XNA 3.1 DLLs in the .exe directory of your published project so that the client can run your game without installing XNA. However, this is against the EULA and it's normally not recommended, because there is no guarantee that the end-user's machine will have other prerequisites installed. The 2 DLLs for XNA are Microsoft.Xna.Framework.Game.dll and Microsoft.Xna.Framework.dll . To aid in locating the DLLs, the following is the directory of where the XNA 3.1 DLLs are located on a 64-bit operating system: C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v3.1\References\Windows\x86 . It should be possible to figure out where your appropriate DLLs are located.