You need to generate VS 2017 projects instead of retargeting 2015 ones.
There’s a setting for this in DefaultEngine.ini:
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
Compiler=VisualStudio2017
Also make sure you have all the required packages for VS 2017:
- game dev with c++
- desktop dev with c++
- desktop dev with .net
- windows 8.1 sdk in individual components