I am getting these errors in Visual Studio:
Error CS0234 The type or namespace name 'X' does not exist in the namespace 'Y' (are you missing an assembly reference?)
But the namespace and type in fact exist and the code compiles just fine. So I assumed this was a cache related issue, the things I've tried:
- Clean/Rebuild
Clear Temp folder
Remove ComponentModelCache as explained here
- Clear ReSharper cache
- Delete bin/obj folders
None of them seems to work. I'm using Visual Studio 2017 v15.8.0.
I don't know if it's related but this started happening after I created another branch, made a hard reset to a commit that was two years ago and then checkout to the current branch. Everything works fine, as I said project compiles but the errors are not going away from the IDE.
How can I get rid of them?