DEV Community

Michael Simmonds
Michael Simmonds

Posted on

Omnisharp not working in vscode - fix

My intellisense for vscode suddenly bailed out on me:

Before we start mucking about too much let's try some standard things to get it back up and running:

  1. Reset the OmniSharp server - Command palette - OmniSharp: Restart OmniSharp.
  2. Check that OmniSharp is looking at the right project - Command palette - OmniSharp: Select Project.

If neither of these work - follow on for another option:

Microsoft released a new version of the C# extension (v1.25) for vscode that breaks for older projects (the one I'm using is 2.1 :\ ). The tools required for it to work are no longer included in the extension - so you need to download them yourself.

  1. In vscode go to settings (I used workspace settings) and search for "Omnisharp - use modern net" set this to off.
  2. Mac: Download and install Mono that includes the build tools (Visual Studio Channel). Windows: Download and install Visual Studio MSBuild Tools or a full Visual Studio version.

Restart vscode. I had restart the OnmiSharp server (see above) even after a restart of vscode itself.

If this helps a single person I'll be happy - I lost hours to this!

Top comments (0)