I just downloaded Visual Studio Code and my Intellisense is not automatically working.
The two settings that control this seem to be set correctly:
"editor.quickSuggestions": true, "editor.suggestOnTriggerCharacters": true,
I do get an Intellisense menu when i start typing and press "CTRL + Space", but this gives me a list of everything and not things specifically for my object.
What am i doing wrong?
Why is VS Code suggestions not working? If you're coding in JavaScript or TypeScript and finds that VSCode IntelliSense does work but does not behave properly, it's likely that you've selected the wrong language mode. TypeScript and JavaScript share the same language service, so you need to select the right language.
For Visual Studio 2017 (and I think Visual Studio 2019 also), close Visual Studio, go into the . vs folder in your projects folder and delete all the contents apart from the . suo file, then reopen Visual Studio. This way you can rebuild the Intellisense cache without losing your preferences.
Visual Studio Code's more advanced editing features (IntelliSense, refactoring tools, etc.) only work in C# files if you have a project.json
file or *.sln
file that VSCode is aware of. Open the folder (i.e. open the File menu and click Open Folder...) with the *.sln
file or project.json
and VSCode will attempt to find all project/solution files in the folder. If there are multiple projects, you may need to select one from the projects button on the right side of the status bar (bottom of the window).
From the VSCode website:
- Selecting a
project.json
-file is opening a DNX-project and VSCode will load that project plus the referenced projects- Selecting a
*.sln
-file is opening a MSBuild-project. It will load the referenced*.csproj
-projects and sibling or descendantproject.json
-files but no other project files that are referenced from the solution file.- Selecting a
folder
will make VSCode scan for*.sln
andproject.json
files and VSCode will attempt to load them all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With