Visual Studio Intellisense not showing some classes
Solution 1
OK so probably not the best solution but it works. I reinstalled Visual Studio and the problem was fixed. Also, it hasn't shown up since (this happened about 3 months ago).
Solution 2
What worked for me is unloading and reloading the project
Solution 3
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.
Solution 4
I am using ReSharper. What worked for me:
- Unload project.
- ReSharper > Options > Environment > General > Clear caches
- Close solution.
- Exit Visual Studio.
- Restart Visual Studio.
- Reload project.
Solution 5
Do you have ReSharper or any other plugins installed? There sounds like a similar issue/solution here. It may be third-party plugins at play depending on what add-ons you have.
Related videos on Youtube
DSchana
Updated on June 04, 2022Comments
-
DSchana almost 2 years
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 usingMicrosoft.Xna.Framework
in a file, IntelliSense is unable to recognize classes likeTexture2D
andRectangle
. 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
-
user1703401 almost 8 yearsTexture2D and Rectangle are in the Microsoft.Xna.Framework.Graphics namespace. So you'll certainly need more than one using directive.
-
DSchana almost 8 years@HansPassant The problem is right from there. It doesn't detect any directives other than System
-
abpatil over 4 yearsNot a single answer given below worked for me :(
-
DSchana almost 8 yearsYea this did not work. Also I just added things I've tried.
-
DSchana almost 8 yearsThe only third party thing u have installed is Monogame.
-
Andre Luus about 7 yearsIn my case this also worked, unloading and reloading the assembly where the new class was added that is.
-
markp3rry about 6 yearsThis worked for me on VS2017 just now; I had an MVC app and a class library that weren't recognising each other in intellisense (although everything compiled OK). Unloading a reloading both projects resolved the problem.
-
Dorival about 6 yearsWorked for me disabling CodeLens first, then unloading and reloading the offending projects.
-
reiti.net over 5 yearsthis worked for me after intellisense stopped working in monogame shared project - thanks