Error compiling template

I recently installed the last version of CUDA.
I’m working with a visual studio, I tried reinstalling it about 5 times so far with absolutely no luck (visual studio and cuda runtime from scratch)
this is the error I’m getting:

Severity Code Description Project File Line Suppression State
Error MSB3721 The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe” -gencode=arch=compute_52,code=“sm_52,compute_52” --use-local-env -ccbin “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64” -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\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\vc142.pdb /FS /Zi /RTC1 /MDd " -o x64\Debug\ “C:\Users\Yaniv\source\repos\CUDA 11.1 Runtime1\CUDA 11.1 Runtime1\”” exited with code 2. CUDA 11.1 Runtime1 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.1.targets 785

the code I’m running is the unchanged code from the template.
thanks for any help!

I have an additional problem with the installation I think I should mention:
when I install Cuda with its visual studio tools, visual studios IntelliSense becomes unusable and makes every small change in code take up to a minute or two.
I’m 99 percent sure it’s related to Nsight but I have no idea as to how to fix it.

my pc specs are as follows:
Nvidia GTX 1070 gigabyte
i7 4790
8GB ram