I updated Visual Studio 2022 Pro this morning to version 17.2.6
When it finished updating, I opened my project and nearly every line of any file I opened suddenly had errors for things like not recognizing strings as System.String or void as System.Void. At one point it was showing 24,000 errors with only 1 file open.
I tried repairing visual studio, restarting my computer, modifying the program with anything that seemed helpful, but nothing fixed it.
Importantly, whenever I built the solution, all the projects would succeed and it could run.
CodePudding user response:
The problem was that visual studio was looking in the wrong location for the code analyzer assembly. To fix this, right click on the solution in the solution explorer and select Manage NuGet Packages for Solution. Update all your packages and the errors should go away
CodePudding user response:
Remove .vs
folder or just .suo
file in .vs\<solution_name>\v17
folder.