Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, June 12, 2019 3:50 PM | 1 vote
I installed the CUDA 10.1 libraries and tried to build the nbody sample. The build failed with the output listed below. I reinstalled Visual Studio and the CUDA Software and still received the same messages. I can build and execute simple console apps and simple universal windows apps with no problems. The message indicates that the property VCToolsInstallDir is not defined. I searched the registry for it and regedit did not find it. I tried building the app in Debug Mode and Release mode. I get different messages for each build.
Here is the Debug Mode output.*****************************************************************
1> Build started: Project: nbody, Configuration: Debug x64
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(433,5): warning MSB8003: The VCToolsInstallDir property is not defined. Some build tools may not be found.
1>Compiling CUDA source file bodysystemcuda.cu...
1>
1>C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.1\5_Simulations\nbody>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\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\ -gencode=arch=compute_75,code=\sm_75,compute_75\ --use-local-env -ccbin "bin\HostX86\x64" -x cu -I./ -I../../common/inc -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -Xcompiler "/wd 4819" -g -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fdx64/Debug/vc142.pdb /FS /Zi /RTC1 /MTd " -o x64/Debug/bodysystemcuda.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.1\5_Simulations\nbody\bodysystemcuda.cu"
1>Failed to run bin/HostX86/x64 (The system cannot find the file specified.
1>
1>).
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(762,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\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\ -gencode=arch=compute_75,code=\sm_75,compute_75\ --use-local-env -ccbin "bin\HostX86\x64" -x cu -I./ -I../../common/inc -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -Xcompiler "/wd 4819" -g -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Fdx64/Debug/vc142.pdb /FS /Zi /RTC1 /MTd " -o x64/Debug/bodysystemcuda.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.1\5_Simulations\nbody\bodysystemcuda.cu"" exited with code 255.
1>Done building project "nbody_vs2019.vcxproj" -- FAILED.
1>Done building project "nbody_vs2019.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Here is the Release Mode output.*****************************************************************
1> Build started: Project: nbody, Configuration: Release x64
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(433,5): warning MSB8003: The VCToolsInstallDir property is not defined. Some build tools may not be found.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.targets(432,9): error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified
1>Done building project "nbody_vs2019.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
All replies (4)
Thursday, June 13, 2019 7:55 AM | 1 vote
Hi Craig6213,
Welcome to MSDN forum.
>>warning MSB8003: The VCToolsInstallDir property is not defined.
This error message indicates something is wrong with the VCToolInstallDir variable.
For VS2019 Community: The path VCToolsInstallDir should be C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.xx.xx\
Please check points below:
1. Navigate to that directory to check if the 14.xx folder exists
2. If the folder exists, from Windows Start menu to open Developer Command Prompt for VS2019 Community and type command:
** echo %VCToolsInstallDir%** to check if the environment is set or if it's set properly.
The correct result of the command should be the path I mentioned above.
Here's my suggestions to resolve the error MSB8003:
1. If the 14.xx folder exists, please update your VS community to latest 15.9.13
2. If the folder not exists, please make sure you've installed the desktop C++ workload, also I suggest you can install corresponding MSVC Tools to make sure the property be set again.
(In VS, go Tools menu=>Get Tools and Features=>install the extra MSVC v142 components)
By default, when we install the MSVC v142 VS 2019 C++ X64/X86 build tools is enough when developing in windows. But I think something interrupt the first installation which causes the VCToolsInstallDir Property undifined, so we can install other tools to set the property again.
3. Please check if there has different VS versions or VS build Tools package in your machine, they can sometimes cause such issue.
4.If all above not helps, and if you're building a xx.vcxproj file, as a workaround you can pass the property by adding this script into the xx.vcxproj file:
<PropertyGroup Label="Globals">
...
</PropertyGroup>
//Add it after Globals PropertyGroup within Project Section//And use your 14.xx version to replace mine 14.xx.xx
<PropertyGroup>
<VCToolsInstallDir>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.xx.xx\</VCToolsInstallDir>
</PropertyGroup>
Then build it to check if the MSB8003 is resolved.
Hope it helps and feel free to let me know if it's helpful to resolve the error property not defined :)
Best Regards
Lance
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Thursday, June 13, 2019 5:08 PM | 1 vote
Thank you very much for your help.
I installed the Visual Studio Desktop Development with C++ Components and the build I was having trouble with was successful.
Friday, June 14, 2019 1:33 AM | 1 vote
Hi Craig6213,
Glad to know it helps. If my answer is helpful to resolve it, could you please mark it as accepted answer so that other members with similar issue could easily find it.
Have a nice day!
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Thursday, June 20, 2019 10:26 AM | 1 vote
Hi friend,
It seems you've solved that issue. You could consider marking the helpful reply which resolve your issue as accepted answer, so that other members with similar issue could easily find it. Also, then we can archive this thread for you.
Have a nice day!
Best Regards
Lance
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.