Creating C++ project for VS2017 with VS2015 toolset installed

UE 4.16.2

I had VS2017 installed with VS2015 v140 toolset (for some older projects)

And when i was trying to create new C++ project from UE4 Editor, compiled with v141 toolset and -2017 generated project files, then MyNewProject is failed to create v141 toolset project files, even with BaseEngine.ini Compiler=VisualStudio2017.

When i uninstalled VS2015 toolset from VS2017, then MyNewProject is created properly, without asking me to retarget projects.

More details here: Retargeting projects error: Visual Studio 2017 - C++ - Unreal Engine Forums

The bug is: UE4 sees, that i have v140 installed and trying to create VS2015 project files, regardless of BaseEngine.ini Compiler=VisualStudio2017 option, and regardless that UE4 is compiled under v141 toolset with “GenerateProjectFiles.bat -2017” project files.

Hope this helps.

PS: Probably i could compile UE4 with v140 toolset also… (not sure though if GenerateProjectFiles.bat will create compatible project files for VS2017 without -2017 flag), but would be better to use v141 toolset as long as i have VS2017 installed, not VS2015?