Visual Studio 2017, Intellisense is not working
Asked Answered
B

5

13

I just upgraded from VS2015 to 2017, and intellisense highlighting of syntax errors has disappeared completely. I tried some suggestions found online, mainly Edit->Intellisense->Refresh Local Cache, but that option is not there anymore.

Under Edit->Intellisense there is only Quick info which does nothing when I press it, and toggle completion mode which is greyed out

I'm using Windows 10, C++ project. Do I need to delete some old files from VS2015 in order for intellisense to work again? like the VC.db file?

Thanks

Burned answered 9/7, 2018 at 21:12 Comment(4)
Does it work on a new project? If it works, clean your project, close all VC instance, rebuild your project. Try again. Watch the status bar - if the project is large, it can take some time.Mahler
With the source file open, look in the top left corner of the source file. Does the left-hand drop down say "(Miscellaneous Files)"? It should say the name of your project (for example, your project name is MyProject and your .cpp file is Source.cpp the top left hand corner of Source.cpp should say MyProject.)Soukup
If you create a new C++ or C# project, does this intellisense works fine or not? Please check if this issue only occurs in this specific solution or all projects, if all solutions meet this issue, please try to re-run the VS 2017 installer as administrator and repair it.Wilderness
@Mich, What about the latest information in your side? Does it have this issue if you update it to the latest VS2017 version?Hilary
P
24

When IntelliSense stopped working in some files, I just deleted the project cache, restarted Visual Studio and opened the project again. Bear in mind that some minor settings also get reset (like the selected architecture).

Step by step

  1. View => Solution Explorer (in case it isn't already open)
  2. Right click "Solution 'Project name'"
  3. Click "Open Folder in File Explorer"
  4. Close Visual Studio
  5. Show hidden folders (Win10 How-to)
  6. Delete folder ".vs"
  7. Open Visual Studio and project (wait a few seconds)

Hope this helps. -Minding

Prokofiev answered 3/1, 2019 at 15:24 Comment(1)
This also worked in Visual Studio 2022.Tacmahack
S
3

If you encounter a file in which the intellisense or error list is not functioning properly, look at the top-left corner of the navigation bar and check to see if that file is marked as “Miscellaneous Files”

If it is, the steps to solve the issue is:

  1. Go to the file inside Solution Explorer.

  2. Right-Click file and select Exclude From Project.

  3. Right-Click your project/folder where the file was and click Add Existing Item, and add the file you just removed back into your project.

This should fix whatever issues you're having. (Tip: You can multi-select source/header files, so this does not need to be done one at a time).

Soukup answered 9/7, 2018 at 21:37 Comment(1)
this worked for me without having to delete anything. I don't see the re-scan option as mentioned in another answer.Watson
B
2

Right-click on solution and select Rescan Solution (Visual Studio 2017). This should re-sync IntelliSense with solution data.

Bowel answered 26/11, 2019 at 15:7 Comment(1)
Thanks! Works very well in my VS 2022 (on Windows) with a small correction, that the right click should be made on the project, and the solution does not have this command 'Rescan Solution', which is strange :)Geometry
N
0

Please try to click Tools->Text Editor->C/C+±>Advanced, under IntelliSense, set

Member List Commit Aggressive to True and recheck this issue. Also, set

Use Aggressive Member list for Auto Member list to *False.

Nanny answered 21/8, 2020 at 12:17 Comment(0)
S
0

In my case, the project was referring to 2 different versions of the same library. I uninstalled one of the versions and intellisense started working.

Schizoid answered 5/2, 2021 at 7:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.