Devicequery failed to build

Hello, I am new to the whole enabling CUDA for GPU. I have the RTX 3060 Ti, and I am trying to enable CUDA to use for PyTorch.

I get this error when I try to build it on VS 2019.

Error MSB4019 The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.5.props” was not found. Confirm that the expression in the Import declaration “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.5.props” is correct, and that the file exists on disk. deviceQuery C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5\1_Utilities\deviceQuery\deviceQuery_vs2019.vcxproj 37

Please help

That looks like a broken CUDA install. For example, if you installed CUDA first then installed VS 2019.