Visual studio compiles fine but still shows red lines

Lost picture Lost · Jan 13, 2014 · Viewed 52.5k times · Source

I am using VS 2012 and it was working all fine until I started observing some funny behavior. When I open my code it shows red Underlines which we usually see when there is an error in our code. Surprisingly, code compiles all fine. I have made following observations that are not normal at all.

  1. Red Underlines in the code
  2. While cleaning or building the solution no error.
  3. red Underlines go away for some time after I build/clean the solution but comes back eventually.
  4. Because of this my intellisense stopped working.
  5. I can not right click to any component and go to its definition.

Any ideas?

Answer

VeganHunter picture VeganHunter · Oct 6, 2017

Visual Studio 2017:

Closing Visual Studio and removing the .vs folder located in the solution directory worked for me.

This folder has a hidden attribute. You may need to change settings in folder options to show hidden files.