Cuda 10.2 installation failed for visual studio integration

I have tried installing CUDA 10.2. However it fails at Visual studio integration step and all other components are listed as Not installed. I need to be able to have visual studio integration step installed as I have to use CUDA in visual studio for coding purposes.
I have following versions of Visual studio installed :
Visual Studio 2012, Visual Studio 2013, Visual Studio 2015, Visual Studio 2017 and Visual Studio 2019