Menu

cuda 10.0.targets was not found | Visual Studio 2017 | CUDA Toolkit 10

Here is the scenario:

  1. You just installed Visual Studio 2017 Community Edition
  2. You just installed CUDA Toolkit 10
  3. You create a CUDA project in Visual Studio
  4. You are trying to build the project with the default code and get an error similar to “cuda 10.0.targets was not found”
  5. You are losing your mind trying to figure out how to solve this problem.

Have no fear, CUDA Education is here.  All you have to do is the following:

  1. Find the folder where all your CUDA-related files are.  In my case it is in C:\Program Files\NVIDIA GPU Computing Toolkit
  2. Navigate to the include folder for CUDA.  In my case it is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include
  3. Copy that directory and then go to Visual Studio.  On the menu bar, click Project -> [name of your project] properties -> VC++ Directories (in the left sidebar) -> Include Directories -> click on the dropdown, then choose Edit -> Add the file directory path then press OK.
  4. You should be able to successfully build you project and then run it.