C# intellisense not working in VS Code

It's caused by adding *.sln and *.csproj to your "files.exclude" setting.

Try this:

Code -> Preferences -> Settings -> "omnisharp.useMono": true/false

Remove from setting file.

Or, Open your project with MonoDevelop or Visual Studio 2015/2017 first, then reopen VS-Code.


Edit 1: Try setting "omnisharp.useGlobalMono": never and then restarting the omnisharp server. Credit: The_Wolf and kao peter


How did you created the project? For the Intellisense to work properly the project needs to have a specific structure.

Assuming you have the .net core sdk for mac and the omnisharp extension installed:

Try the following:

  1. Open your integrated terminal (View => Integrated terminal)
  2. Create some new directory to host a test project say "testproj" e.g => mkdir testproj

  3. use the dotnet cli to initialize the project => dotnet new console

See if you got intellisense.
Also i'd recommend watching the .net core on Mac introduction video.


In VS Code v1.43.2 adding following line to settings worked for me:

"omnisharp.useGlobalMono": "never"

The setting's value "never" had to be double-quoted otherwise it would be flagged in red. Even with the quotes, it remained highlighted in yellow. Not sure why, as all other options/values in there are blue. I presume this indicates some sort of warning, but it works.

(As an aside, I would love to understand what a "Globally installed mono" is. However my only interest here was getting IntelliSense working, so re: omnisharp I'm pleading 'newb'.)