Installing CUDA toolkit 10.2 with VS 2019 on Windows Server 2016 failed, not on Windows 10 - strange...

Hi all,

I spent my last 2 weeks getting frustrated so much.

I have a server at work, on which Windows Server 2016 runs, equipped with 2 NVIDIA V100 GPUs. Until two weeks ago, I had CUDA Toolkit 10.1 Update 1 (and hence Nsight Visual Studio Integration 2019.2) with driver 425.25 installed successfully on the system with Visual Studio 2019. When I installed it some months ago I had no problems at all, I just had to fix the issue of no CUDA .cu o .cuh files to be added to the project (as described here following the instructions given by prdas31). Then, in order to update Nsight Visual Studio Edition from 2019.2 version to 2019.4 version, everything messed up. Disaster. Even trying to follow instructions suggested here, which apparently worked for most of the people, I had no good results, even trying to clean up all the system and reinstalling the same configuration. Extracting the CUDA Toolkit installer and manually copying the files from the Nsight Visual Studio Integration folder did not work on my system. I tried almost every combination of CUDA Toolkit / driver (CUDA Toolkit 10.1 original, Update 1, Update 2, and drivers 419.69, 425.25, 426.23, 426.32), no way. I’ve tried also installing the CUDA toolkit 10.2 with the latest driver 441.22, nothing good too.

Here comes the strange thing.

I tried then on my home laptop, equipped with Windows 10, a GeForce GPU (don’t remember actually the model) and Visual Studio 2015 Community at the beginning. I tried installing CUDA Toolkit 10.2 with driver 441.22. Everything worked fine. Nsight Visual Studio Integration for (obviously) VS2015 gave no problems at all. I was happy.
So I tried to uninstall VS2015 from my home laptop and install VS2019 Community, then running again the CUDA Toolkit 10.2 installer without uninstalling or cleaning any NVIDIA component. It successfully installed Nsight Visual Studio Integration for VS2019. I was very happy.
Then I came back to the server at work, and I followed the same, identical scheme. Everything worked fine for VS2015. But when I removed VS2015, installed VS2019, and then running again the CUDA Toolkit 10.2 installer, no way, same error trying to install Nsight Visual Studio Integration for VS2019.

How damn can it be possible??? This is more tricky and weird than the Bermuda Triangle disappearances.

My actual configuration is (and I think it will remain this, otherwise I’ll have to waste more time than what I did till now) VS2015 Community Edition, Windows Server 2016, CUDA Toolkit 10.2 (hence Nsight VS Edition 2019.4), GPU driver 441.22. In this way, everything works fine, at least for me.