Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling XNA to 64-bit

I'm working on a simulator that models very complex interactions between many objects, and I mean millions.

I've used XNA because of the useful things that it lets me do easily, especially with the rendering.

My problem is that I'm running into OutOfMemoryExceptions after only a few seconds of simulation. I quickly realized that my program is only running in 32-bit mode, so I only get a few GBs of my somewhat larger amount of RAM.

How can I run an XNA game in 64-bit mode?

like image 788
annonymously Avatar asked Nov 21 '12 02:11

annonymously


Video Answer


1 Answers

XNA used to be 32-bit only. You can try to compile to 64-bit, but then you are going to have issues because there won't be any 64-bit XNA libraries to load up. Everything I have found trying to back this up has been comments reminding viewers to compile as x86.

To compile as x64: Right-Click on your solution and go to Configuration Manager. From there select x64 as your Active Solution platform. You may have to create it and then select all your projects as x64. You could also try building as Any CPU since you are on 64-bit Windows, it should automatically start up in 64-bit mode.

EDIT: I found one of my old VM's that had XNA 4 installed on it. It appears that there is not a way to force it to compile to 64-bit. Even when I try to create a new platform, it will only allow me to select x86.

like image 153
TyCobb Avatar answered Oct 07 '22 11:10

TyCobb