C# : Out of Memory exception

3 years old topic, but I found another working solution.
If you’re sure you have enough free memory, running 64 bit OS and still getting exceptions, go to Project properties -> Build tab and be sure to set x64 as a Platform target.

enter image description here

Leave a Comment