I followed the install instructions in https://code.visualstudio.com, but when I write C# code, the IntelliSense suggestions don\'t pop up automatically, so I must trigger i
OmniSharp doesn't know where your project files are. In your screenshot, the left sidebar says "You have not opened a folder". OmniSharp will look in your currently opened folder for project files.
This should be enough for OmniSharp to start providing you Intellisense.
To activate IntelliSense on a .NET project:
From what I've seen, IntelliSense cannot be activated on a .cs file alone. (See @natemcmaster's answer).
Try changing the editor.quickSuggestions
setting to true
in the settings.json file. The settings file may be found in:
Windows: %APPDATA%\Code\User\settings.json
Mac: $HOME/Library/Application Support/User/settings.json
Linux: $HOME/.config/Code/User/settings.json
In my case the problem was that I had 2 versions installed. I was launching from the command prompt and it kept running the older version. In Programs and Features, I removed the one that didn't have "(user)" at the end of the application name, and when I opened Code again, it started downloading packages, one of which was OmniSharp, and then IntelliSense started working.
Note that I was also getting the following warning when opening the older version, and searching for the warning led me to instructions on removing the other version, which in turn fixed the IntelliSense problem:
You are running the system-wide installation of Code, while having the user-wide distribution installed as well. Make sure you're running the Code version you expect.
You just have to pick up the language type from the bar at the bottom (the button with the flame).