Unable to compile and run default CUDA project in Visual Studio 2022 (17.8)

Hello

I have installed Visual Studio Community 2022 (64-bit) Version 17.8.3 and CUDA Toolkit 11.8, but I’m unable to compile default project that have been created with visual studio project wizard (Cuda 11.8 Runtime ). I have the following error:

|Error|MSB3721|The command C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc.exe -gencode=arch=compute_52,code=\sm_52,compute_52\ –use-local-env -ccbin C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64 -x cu -IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include -IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler /EHsc /W3 /nologo /Od /Fdx64\Debug\vc143.pdb /FS /Zi /RTC1 /MDd -o C:\main\workspace\code\cuda-workspace\CudaRuntime1\CudaRuntime1\x64\Debug\kernel.cu.obj C:\main\workspace\code\cuda-workspace\CudaRuntime1\CudaRuntime1\kernel.cu exited with code 1

I have verified that the Visual Studio and CUDA versions are compatible, nvcc.exe and cl.exe are located correctly when invoking the compilation command, my GPU is compatible with this CUDA version. I don’t know what could be a reason for this compilation error… Also I haven’t found a way to set the log error level to verbose for nvcc to better understand the output. In attachments text files with information about my development environment(VS, nvcc, etc). Driver Version 528.79.

deviceQuery_output.txt (2.4 KB)
nvcc_version.txt (231 Bytes)
visual_studio_env.txt (4.3 KB)