Visual studio 2022 don't highlight the errors

Hello,
When i click on an error in Unity Visual Studio 2022 opens but don’t go to the line where is the error, i added the path to the exe of visual studio 2022 in preferences but doesn’t help. Tried opening the project with visual studio 2022 but doesn’t solve it either
I am using Unity 2021.3.f01

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

I got to solve it, i went to Preferences - External tools , and instead Open by extension i chose open by Visual studio 2022

2 Likes