0

I cannot get Intellisense to work on any of my .cu files (CUDA files). I tried the methods discussed in this question and here and so now I am wondering if anyone can help me solve this issue.

So far, I have added .cu to the known extensions list and $(CUDA_INC_PATH) to the list of included directories, but still all .cu files look like this:

enter image description here

CUDA files compile and run fine of course, but its just Intellisense that does not work on .cu files. Intellisense seems to be fine with extensions of other languages.

  • Visual Studio Professional 2017
  • CUDA v10.2
If_You_Say_So
  • 1,195
  • 1
  • 10
  • 25

2 Answers2

1

My environment:

CUDA 11.2 Update 2

Visual Studio 2017 Community 15.9.31

enter image description here

It works well in my side. Make sure that your VS2017 has installed C++ workload.

So please try the following steps:

1) disable any other third party extensions under Tools-->Extensions and Updates-->Installed

2) close VS, delete all files under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_xxx\ComponentModelCache

Then, restart VS to test again.

Further, you could rename the whole C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_xxx folder to another name like vs2017(which is more like a delete operation and the new vs2017 folder is a backup ) or just delete the folder and then re-login into VS.

3) repair VS2017 or just update it to the latest version.

4) install the latest CUDA 11.2 version and then try the step 2 to test again.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • Thanks for your answer. I did all the steps but they didn't fix the issue. I ended up uninstalling VS2017 and installing VS2019 instead and that fixed the issue. – If_You_Say_So Mar 17 '21 at 14:54
1

So I could not really find what the issue was and ended up updating my Visual Studio to VS2019 Professional with CUDA 11.2 and only then the issue was resolved.

If_You_Say_So
  • 1,195
  • 1
  • 10
  • 25