Can't build CUDA Samples V11.4 in VS 2019

Summary:
Can’t build the CUDA Samples/v11.4 using VS 2019
Of the 183 projects; only 32 builds successfully and 151 failed with error MSB3721 The command ... exited with code 1.

System Specs: Windows 10 Pro 64-bit 24 Core, 256 G RAM, 5+ TB drives

Today:

  1. Installed brand new RTX A500
  2. Upgraded VS Community 2019 to latest (v16.10.3)
  3. Added the C++ package to VS2019
  4. Uninstalled all Nvidia apps
  5. Upgraded Nvidia Driver to 471.11
  6. Installed latest CUDA Toolkit (v11.4)
  7. Opened Sampels_vs2019
  8. Rebuild Solution

Output (last 6 lines):

183>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.4.targets(785,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" -gencode=arch=compute_75,code=\"sm_75,compute_75\" -gencode=arch=compute_80,code=\"sm_80,compute_80\" -gencode=arch=compute_86,code=\"sm_86,compute_86\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64" -x cu   -I./ -I../../common/inc -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\/include" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include"  -G   --keep-dir x64\Debug  -maxrregcount=0  --machine 64 --compile -cudart static --threads 0 -g  -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fdx64/Debug/vc142.pdb /FS /Zi /RTC1 /MTd " -o x64/Debug/streamOrderedAllocationP2P.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.4\0_Simple\streamOrderedAllocationP2P\streamOrderedAllocationP2P.cu"" exited with code 1.
183>    1 Warning(s)
183>    1 Error(s)
183>
183>Time Elapsed 00:00:01.49
========== Rebuild All: 32 succeeded, 151 failed, 0 skipped ==========
  1. I’ve verified that "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe" exists
  2. first part of my path var is: PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\libnvvp;

I’m at a loss as to what I’m doing wrong.

Any ideas anyone? Thanks.

Hi @tristen.fielding
Please note this forum branch is dedicated to CUDA GDB support. You question might be more suitable for (for example): CUDA Setup and Installation - NVIDIA Developer Forums

Works fine on my side with latest VS2019 com:
May have a try to install the whole pkg (toolkit, lib, drivers…together)?