@muchcharles, I looked into this recently and found out there’s a separate setting for toolchain selection. Without it, it chooses in a really convoluted way based on what it can find installed, preferring 2015 toolchain even if the project files were generated for 2017. At least, that was the behaviour until recently.
You can add the following inside the <Configuration> section of BuildConfiguration.xml to force it:
<WindowsPlatform>
<Compiler>VisualStudio2017</Compiler>
</WindowsPlatform>