Q:

Use the 64-bit Visual C++ Toolset in Visual Studio 2017

My (quite large) C++ project has grown to a point where I get a C1060: compiler is out of heap space error when trying to compile my project.
I'm compiling on a 64-bit Windows 10 machine, but it seems that Visual Studio is compiling my project with the 32-bit toolset (see screenshot below).

The C1060 help page asks me to use the 64-bit toolset, but the link provided talks about how to enable it when compiling with the command line only.
Is there any way to set project properties or something else in Visual Studio 2017 to tell it to use the 64-bit compiler toolset (which is already installed on my machine)?

A:

This is how I made Visual Studio 2017 use the x64 toolset, as per this answer:
Open the .vcxproj file with your favourite text editor, find this line:
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Then add this immediately after it:
<PropertyGroup>
  <PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>

That answer was for Visual Studio 2013 but it works for 2017 too.
Additional Note:  However, it turns out this didn't actually solve my problem.  The 64-bit toolset ate up all the memory on my machine and forced me to need to reboot.  When I rolled back the latest changes to the code, it compiles using ~2.8GB for the 32-bit compiler, and compiles using ~4.2GB for the 64-bit compiler (the latest code consumed ~6.4GB before freezing my task manager on my 8GB machine).  I'll be looking through the new code and attempting to figure out why so much more memory was needed.

