arc-menace
arc-menace

Reputation: 475

Visual Studio 2022 showing errors for everything

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.

Upvotes: 3

Views: 8200

Answers (2)

Dmitrik
Dmitrik

Reputation: 166

Remove .vs folder or just .suo file in .vs\<solution_name>\v17 folder.

Upvotes: 15

arc-menace
arc-menace

Reputation: 475

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

Upvotes: 2

Related Questions