Compiler Error MSB3721 with Cuda 6.5 and VS 2013

Hello Team,

I am Compiling one application with cuda 6.5 and VS 2013 and i am getting one issue-

Error 112 error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\bin\nvcc.exe” -gencode=arch=compute_30,code=“sm_30,compute_30” -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” --use-local-env --cl-version 2013 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.5\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -I. -g -DWIN32 -DNDEBUG -D_LIB -D_MBCS -Xcompiler “/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o x64\Debug\ “C:\Users\Pradeep\Desktop\tuka_cloth-simulator_Texture\Clothsim\solvers\collision_solver\”” exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 6.5.targets 593 9

Please help me to solve this issue.

Hi, isantosh85

This seems more link env set up issue. The MSB3721 is an generic issue.
I googled this and find there may be multi reason caused this.

If google still not solve your problem, can you share your project ?

Also maybe you can upgrade to CUDA 9.1 to check.

Hi Veraj,

I tried in VS 2015 with cuda 9.1 and getting the same error MSB3721.

I am working with openGL and Cuda for the cloth simulation.
I am trying to build the code in the Debug mode.

My code is working fine with the VS2010 and cuda 4.2, when i am updating my project with the VS 2013 cuda 6.5 with graphics card NVIDIA GeDorce GTX 970 then i am getting the above error.

Same error i am getting with Different Graphics Quadro M1200 VS15 and cuda 9.1.

Please Help me to resolve this issue.

Hi, isantosh85

I think the build error should not relevant to the graphic card.

Can you share the code you used ? I will try to reproduce on my side.
If you agree, I will send you the link to upload the file.

Also can you try if CUDA 9.1 SDK sample also can not build successfully, like 2_Graphics/simpleGL ?

Thanks Veraj,

Now i am working with VS 2013 and Cuda 6.5.

I am updating the VS2015 , i will check the sample application after done.

I tried the sample application SimpleGl (C:\ProgramData\NVIDIA Corporation\CUDA Samples\v6.5\2_Graphics\simpleGL) and its compile and running.

Last time i tried the sample nbody (C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1\5_Simulations\nbody) in VS 205 and cuda 9.1 and that was running without any problem.

when i am running my code in VS 2013 with 2010 platform in Release mode its running.
changing the platform with Visual Studio 2013 (v120) getting the MSB3721 issue.


Then it may be the project property config issue.

Thanks Veraj,

I am following the sample application property, but i am unable to compile the application.

Please suggest me which property is giving this issue.


Its hard to tell if I do not have the project.

But you can compare the build command line of your project and the sample application.

This can be checked from Properties->Configuration Properties->CUDA C/C+±>Command line

Thanks Veraj,

I will do the same as you suggested then i will update to you.

Hello Team,

I solved the Nsight debugger issue with the Cuda project.

I Identify the Cuda version that you are using, Installed the Cuda toolkit with custom install and choose the driver that comes with the Toolkit, this removes the pre-installed drivers.

Now go to the Nsight site
and choose that version of the nsight which support the installed graphics driver , This works for me in my both the projects:
one with Cuda 7.5 in which i used the driver 353.90 and Nsight 4.7 with Visual Studi0 2010,
second project with the Cuda 8 and the driver version 377.55 and Nsight 5.2 with Visual Studi0 2013.