Cuda installer not finding visual studio

I want to install Cuda to use tensorflow-gpu, unfortunately when I install it using the installer I get this message

“No supported version of Visual Studio was found. Some components of CUDA toolkit will not work properly. Please install visual studio […]”
The thing is I already downloaded the latest version of VS. Does anyone know how to fix this?


Continuing the discussion from Cuda installer not finding visual studio:

This was fixed for me by installing a older version of Visual Studio