Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellisense not automatically working VSCode

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?

like image 594
MaylorTaylor Avatar asked Apr 30 '15 18:04

MaylorTaylor


People also ask

Why is my IntelliSense not working in VS Code?

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.

How do I refresh IntelliSense in Visual Studio?

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.


1 Answers

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 descendant project.json-files but no other project files that are referenced from the solution file.
  • Selecting a folder will make VSCode scan for *.sln and project.json files and VSCode will attempt to load them all.

enter image description here

like image 163
Nacimota Avatar answered Sep 23 '22 07:09

Nacimota