Frequently Asked Questions/Known Issues

This topic answers some of the most commonly asked questions about using XNA Game Studio Express 1.0 Refresh.
General Questions Application Model3D Graphics
Input AudioMath

General Questions

How do I file bugs or make suggestions?

  • Sign up for Microsoft Connect at and click the XNA Game Studio Express connection under available connections.
  • After you sign up, you can file a bug or make a suggestion by selecting Feedback on the XNA on MS Connect page.

How do I distribute my game?

Do I need a connection to Xbox LIVE to play my XNA Framework game? If I have written a multiplayer game, must the player with the XNA Creators Club membership sign in first?

XNA Game Launcher requires a connection to Xbox LIVE at all times.

In the event that multiple people wish to play a local multiplayer XNA Framework game, it is essential that the player with a valid XNA Creators Club membership sign in first before launching XNA Game Launcher. After launch, additional profiles can then sign in to play.

If multiple profiles on a single Xbox 360 console have a valid XNA Creators Club membership, the connection settings that are used by XNA Game Launcher will always default to player one.

Can I target both Windows and Xbox 360 with the same solution?

Due to the default structure of a solution authored in XNA Game Studio Express, it is highly recommended that you create a unique game solution and location for each platform that you are targeting. When saving a solution, use a unique folder for each solution. Note that you can share source code between the two solutions by adding source files as links.

How do I add a file link to my project instead of copying the file?

  • From Solution Explorer, right-click the project, click Add, and then click Existing Item.
  • Select the file you want to link to.
  • Click the small arrow to the right of the Add button, and then click Add as Link. This creates a link to the selected file (and not a copy) in your project.

    Making a link to an existing file in your project is quite different than adding an existing item to your project. A file link stores only the path to the file in question, not a copy of the contents. This is useful if the linked file is dependent on additional external files and ensures that the latest version is always used by the solution.

My computer cannot connect to my Xbox 360 console. What should I do?

This may indicate issues with your network settings, connection key, file names, or file system. Please see Deploying an Xbox 360 Game for detailed descriptions of these issues.

What do I do to fix the error message "NoSuitableGraphicsDeviceException was unhandled"?

Check the inner exception for more detail on why the graphics device could not be created. XNA Game Studio Express thoroughly checks why the graphics device could not be created and reports these checks in the inner exception.

If NoSuitableGraphicsDeviceException doesn't have an inner exception, it is likely that your graphics card does not have a DirectX 9 driver, that it does not support Shader Model 1.1, or that the hardware acceleration slider is not set to Full in your settings.

To determine the version of DirectX installed on the computer

  1. Click Start, and then click Run.
  2. In the Open box, type dxdiag, and then click OK.
  3. The System tab will display information about the version of DirectX that is installed on the computer.

To set hardware acceleration to Full on Windows XP

  1. Right-click the desktop, and then click Properties on the menu.
  2. Click the Settings tab, and then click Advanced.
  3. Click the Troubleshoot tab.
  4. Move the Hardware Acceleration slider until it is set to Full.
  5. Click OK, and then click Close.

To set hardware acceleration to Full on Windows Vista

  1. Right-click the desktop, and then click Personalize on the displayed context menu.
  2. Click Display Settings
  3. Click Advanced Settings...
  4. Click the Troubleshoot tab.
  5. Click the Change Settings button, then move the Hardware Acceleration slider until it is set to Full. Note that for display adapters that do not allow hardware acceleration to be changed, the Change Settings button may be disabled.
  6. Click OK on the three open dialog boxes.

To determine which shader models are supported

Please see How to: Check for Shader Model 2.0 Support for information about how to programmatically query the shader capabilities of the graphics card.

How do I do video playback with XNA Game Studio Express?

The XNA Framework does not contain functions for video playback. We are investigating this for future releases.

Why does my application work from my local computer, but throw SecurityException when I move it to a shared network folder?

This is a security feature of the Common Language Runtime (CLR). Applications that are run from locations other than the local system have greater security restrictions than applications run locally. Running XNA Game Studio Express titles from a shared network folder is not supported.

What shader models does XNA Game Studio Express support?

XNA Game Studio Express supports all the DirectX 9 shader models (versions 1.x, 2.x, and 3.0) on Windows, along with some variants. For a full list of supported shaders, see the ShaderProfile enumeration.

On Xbox 360, XNA Game Studio Express supports Shader Model 2.0 and an extended variant of 3.0 customized for the Xbox 360.

Some starter kits may have more restrictive requirements. For example, the Spacewar Starter Kit requires Shader Model 2.0 or higher.

Is Visual Studio supported with XNA Game Studio Express?

No. XNA Game Studio Express is designed to install custom extensions to Microsoft Visual C# Express that do not work with Microsoft Visual Studio Standard (or above). Microsoft Visual Studio will be supported in a future release.

Microsoft Visual C# Express runs side-by-side with Microsoft Visual Studio without conflict.

Can I use the Delay Sign feature for my Xbox 360 game?

Use of delay signing can prevent the game from running on the Xbox 360, because the console uses strong name verification. Under strong name verification, the assemblies will not load until the signing process is complete.

3D Graphics

How do I create lighting and material effects in XNA Game Studio Express?

Lights and materials are implemented in XNA Game Studio Express with effects. To implement lighting or material effects, create an effect that contains the desired vertex or pixel color transformation. The actions of a simple effect are encapsulated in the BasicEffect class, which provides functionality for applying lights and materials, and setting world, view, and projection transformations. You may choose to utilize BasicEffect for simple functionality or create your own effects using the Effect class.

How do I create my own effects?

For a sample of a simple effect using the Effect class that sets the diffuse color of a vertex, see How to: Create and Apply Custom Effects.

What is an effect file?

An effect is a combination of vertex and pixel shader code grouped together to encapsulate a particular rendering technique. Effects can be written in either high-level shader language (HLSL) or assembly code.

An effect file contains effect code. You may see effect files with an .fx extension that contain HLSL code. Effects in HLSL or assembly code must be compiled to a binary format before they can be used in an application.

For overviews of HLSL and the effect file format, see the HLSL Shaders and Effects DirectX Programming Guides on MSDN. Complete reference documentation for HLSL, shader ASM, and the effect file format is available in the Direct3D API Reference.

After drawing using Graphics.SpriteBatch, why do my 3D objects draw incorrectly?

By default, SpriteBatch.Begin does not save your current render state, and will change certain render state properties that may make 3D objects render incorrectly. You can choose to either reset the render state yourself after the call to SpriteBatch.End, or call SpriteBatch.Begin and pass in SaveStateMode.SaveState, which will restore the render state after sprites are drawn.


Can I map the Xbox Guide button on the Xbox 360 Controller to an action?

No. The Xbox Guide button is reserved.

My mouse cursor is not visible. How can I make it visible?

Set the Game.IsMouseVisible property to true. Mouse support is available only for Windows.

The Xbox 360 Controller does not work properly in Windows. How can I correct this?

For the Xbox 360 Controller to work correctly in Windows, you need to install the latest Xbox 360 Controller driver. You can download this driver from Microsoft Hardware Download Gaming Software.


Can I load and play a wave file from the Audio API without using the XACT tool?

No. All wave files that you wish to play must be compiled into an XACT project before you can play them.

How can I get more information on using XACT?

For an easy guide to adding sound files to an XACT project and playing them, see How to: Add a Sound File to Your Game Using XACT and How to: Play a Sound. For detailed information on how to author audio in the XACT tool, including information on categories, variables, and other advanced features, see XACT Audio Authoring.

Why does calling GetCue from SoundBank never return a cue?

In your XACT project, you may have set a sound bank property called IncludeCueNames to False. For each sound bank in your project, this property must be set to True. Open XACT, load your project, and click each of your sound banks in the project tree view. Check the value of IncludeCueNames in the property pane as you click each sound bank. If any of these values are set to False, set them to True and rebuild your project.


What coordinate system does the XNA Framework use?

The XNA Framework uses a right-handed coordinate system.


Why do I get an exception when I try to use Storage classes?

One possible reason is that one of your operating system folders — especially %_NTDrive%\Documents and Settings\ — is mapped to a network drive. Storing player data or running titles from a network location is not supported in this release.

For answers to more questions about XNA Game Studio Express and the XNA Framework, see the XNA Developer Center.