Cross Platform XNA Projects (X64 Content)

One of the requirements of the framework I am building (FGF) is cross platform support. For my XNA games this means support for not only Windows but also the Zune and the Xbox 360. For my Windows based projects I often find that X64 can be used (and in the case of IIS in 2008 R2, encouraged) so I also support X64 versions.

The problem is that when using an XNA project template to build a library for the simple fact that XNA projects can automatically synchronized (across platforms), Visual Studio blocks the creation of an X64 build target. Rather you are stuck with X86, Zune or Xbox 360.

The good news is that you can get around this! Open up the Windows project file (csproj) in a suitable text editor and copy the sections for both “Debug|x86″ and “Release|x86″ and paste them right after.


  true
  full
  false
  ..\Bin\x86\Debug\
  DEBUG;TRACE;WINDOWS
  prompt
  4
  true
  false
  x86
  false


  pdbonly
  true
  ..\Bin\x86\Release\
  TRACE;WINDOWS
  prompt
  4
  true
  false
  x86
  true

Next you simply replace the instances of x86 with x64 and change anything else you need.


  true
  full
  false
  ..\Bin\x64\Debug\
  DEBUG;TRACE;WINDOWS
  prompt
  4
  true
  false
  x64
  false


  pdbonly
  true
  ..\Bin\x64\Release\
  TRACE;WINDOWS
  prompt
  4
  true
  false
  x64
  true

One warning – this should only be used for projects that don’t require references to the XNA framework. At this time Microsoft has no support for x64 XNA references.

Comments are closed.