Intelisense stopped working in vs code

Hope this may save someone some time. I created a new c# script in the unity editor and opened the script immediately (may not have has time to fully compile yet). When my script opened in vscode, Intelisense stopped auto-completing words from unity and my project (i.e. RigidBody, MyMonoBehaviour, etc…). It also did not mark errors in the editor. Regenerating project files did not help.

What did help:
Open extensions tab in vscode and open the C# extension. Open the extension’s settings and towards the bottom, unmark the checkbox for “omnisharp: use modern net” (set it to false). If it offers to restart the server, agree. wait for the server to restart (it will let you know in the ‘output’ window). Intelisense and syntax highlighting should be working properly again.

Hope this saves someone some time as i did not find this answer and it was not necesary for other times i encounterred the same issue.

1 Like

Thanks for coming back to resolve the issue… just for completeness:

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

1 Like