I had this problem, but I fixed it by switching the option of “Platform target
“, from x86
to x64
or “Any CPU
“. ( right click on the project, then select “Properties”, then the tab “Build”, then on “Platform target” select “x64” )
The problem is that for platform x86
you can use only about 1.8 GB of RAM. For platform x64
, you do not have this limitation.