Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Intellisense not showing some classes

My Visual Studio is not showing a lot of the available classes in the IntelliSense auto-complete. For example, a project I'm working on has a reference to the Microsoft.Xna.Framework namespace, yet even after adding the using statement using Microsoft.Xna.Framework in a file, IntelliSense is unable to recognize classes like Texture2D and Rectangle. I can still type them in, however, without getting a compiler error. Any idea what's happening?

The IntelliSense detects standard libraries like System.Diagnostics but not any external ones.

It is not a NameSpace conflict issue because classes within the current namespace are also missing from the IntelliSense.

I have tried:

  • Restarting Visual Studio (With and without closing tabs)
  • Deleting the contents of %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentCacheModel folder
  • Resetting import and export settings
like image 261
DSchana Avatar asked May 03 '16 21:05

DSchana


People also ask

How do I enable IntelliSense in Visual Studio?

To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.

How do I enable IntelliSense in Visual Studio code?

Using Cake extension for Visual Studio Code: Open command palette ( Ctrl+Shift+P ) Type Cake. Select Install intellisense support command.

Why VS code is not giving suggestions?

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.


2 Answers

What worked for me is unloading and reloading the project

like image 108
Johan Avatar answered Sep 19 '22 06:09

Johan


If unloading/reloading the project doesn't work, try deleting the .suo file found in the SolutionName/.vs/ folder. The .vs folder is an auto-created, hidden folder so you will have to show hidden folders in order to see it.

like image 43
Jacob Stern Avatar answered Sep 19 '22 06:09

Jacob Stern