I am currently facing a weird problem with visual studio 2017 community edition. It randomly lose all reference in the "reference tab" and the intellisense stop work at all.
It is only at design time, even with tons of "false errors" in the error window, if you compile and run, it will work just fine.
I was looking over some similar problems and one solution said to remove one tag from the .projec file.
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
I did it, at first time it worked, but after while, it randomly stopped working again. I went back to the file but that particular tag wasn't there.
The weird part is that when it happens, if I go to the reference window, it have all namespaces unselected. if I select any namespace, it throws me an error and select all corretc namespaces at same time.
After selecting the namespace, when I save the project I get this error.
If I close everything and open again, it is working just fine, until randomly stop working again.
I have tried other solutions as well but it always back to the same scenario.
It started happening after I had to delete the folder "C:\Users\xxxxxx\AppData\Local\Microsoft\VisualStudio".
I had to delete that folder because it freeze every single time I tried to open any project, the only solution that solve was deleting that particular folder.
After that the all projects open just fine, but I need to select the reference again and that when the problem starts.
It is a new project made in the current version of the visual studio, not a migration.
As suggested by @Sara Liu, I will mark
updating the visual studio to a version >= 15.5.5
As an answer to the problem.