Sometimes my Visual Studio C++ projects fail to show proper syntax highlighting, or I get this annoying message that my headers cannot be found in the project when I try to ctrl-click on them from my source files.
I've found the most effective solution to be these steps:
- Clean all projects in your solution: Build > Clean Solution
- Close Visual Studio
- Open up a terminal and navigate to your solution directory. Run
rm ./.vs --Recurse --Force
- Re-open your project. Ta-da! It should work now
If this doesn't work for you or if you figured out a different solution, post it in the comments for future readers!