No compiler found. [Visual Studio 2017]

Hello

I have tried everything you have said in this thread and I still get the error “No compiler was found. In order to use a C++ template, you must first install Visual Studio 2017” as you can see in the attachments. I tried:

  1. Installing Unreal 4.16.1 first then VS Community 2017, did not work
  2. Installing first VS Community 2017 with the unreal installer checked, did not work
  3. I tried the repair option too in VS Community 2017 installer, did not work
  4. I chose a new blueprints project, and changed the project settings->toolchain and the editor settings->source code to VS 2017, then I created a new c++ class and still I get the same error and it does not let me create any c++ code

I also checked the C++ support option in the VS 2017 installer

I saw that by default the system set the ENV variable VS140COMNTOOLS to a path that DID NOT exist in my windows 10 PC: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools so I set it to a valid path in my PC: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools

Can you please help me to create a C++ unreal project? what am I missing?