Cannot run samples on MS Visual Studi 2019

I installed visual studio 2019 followed by the CUDA dev kit from:

in that order.

When I go to run any of the samples I get the following error:

Severity Code Description Project File Line Suppression State

Error MSB4019 The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.1.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. cdpSimpleQuicksort C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.1\0_Simple\cdpSimpleQuicksort\cdpSimpleQuicksort_vs2017.vcxproj

It’s a 2017 project that I am trying to use in 2019.

15 Likes

Just copy all files from this path (depends on the path you installed CUDA in)

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions

to this path:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations

52 Likes

Thank you s.ken. Your method works perfectly. Now I can use CUDA10.1 on VS2019. Thank you very much.

Thank you

thank you

Thank you

Thank you!

Hello, I wonder why this problem arose in the first place and if it could end in further errors. Thank you.

Thank you ken now i can use v10.2 with VS2019

v10.2 with VS2019
This method not working in my VS.
And I was unable to build darknet.
And the error I received was 10.0.props not found even though I was using the lastest v10.2.
I really need some help.

open build\darknet\darknet.vcxproj with Notepad, find 2 places with “CUDA 10.0” , change it to your CUDA-version.i.e. 10.2

4 Likes

Thanks brother

For anyone facing this error regarding CUDA 10.0

Copy the files from
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions

to

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets

3 Likes

Thanks this worked for me too.

Thank you

Thank you.

thank you

thanks a lot

Thanks!

Hi, I have the same issue but with CUDA 11.2 while intending to build deviceQuery_vs2019:

Severity Code Description Project File Line Suppression State
Error MSB4019 The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.props” was not found. Confirm that the expression in the Import declaration “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.props” is correct, and that the file exists on disk. deviceQuery C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.2\1_Utilities\deviceQuery\deviceQuery_vs2019.vcxproj 37

The problem is that the source folder you indicate does not exist:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\extras\visual_studio_integration\MSBuildExtensions: NO SUCH FOLDER

I tried to search for “11.2.props” on my HD but did not find anything… any idea?