Visual Studio 2012 - Intellisense sometimes disappearing / broken

Visual StudioVisual Studio-2012Intellisense

Visual Studio Problem Overview


My colleagues and I are using VS2012 for some weeks now. Sometimes after working several hours the intellisense is broken. After closing all open tabs it works again.

Are there more people out there having the same problem? It can't be an extension problem because I have the same problem at home. Maybe there is a workaround for this?

Visual Studio Solutions


Solution 1 - Visual Studio

These are the few top solutions for getting Visual Studio 2012 intellisense back on track try them one by one, hope one of them will solve the problem:

When the problem occurs next time follow these: start from #1 and Move to next when the earlier one doesn't work for you

1: Close all the tabs and open your file again. (Thanks to russds)

2: Clean the Build > Close the Solution > Restart Visual Studio > Open the Solution again

3: Goto: Edit > IntelliSense > Refresh Local Cache

4: Close Visual Studio 2012 and delete this folder: %AppData%\Microsoft\VisualStudio\11.0\ReflectedSchemas

5: Goto: TOOLS > Import and Export Settings > Reset all settings

6: Delete .suo file in the project folder. (Thanks to Jason Steele)

I am hopeful your problem will get solved by any of the above six steps. But if it doesn’t after all this than I think you should consider reinstalling your VS2012.

Solution 2 - Visual Studio

I use Visual Studio 2012 and I have the same problem. To fix it (when Intellisense is not working anymore), I just have to close the current tab (in which Intellisense is not working) and reopen it. There is no need to close Visual Studio or all the tabs.

Solution 3 - Visual Studio

You don't need to restart Visual Studio. Instead, close the current solution and then reopen it again. I hope there was an easier solution though.

Update 4/16: For XAML users, a solution that works is as simple as intentionally breaking your code; this should be enough to retrieve intellisense back. More in here.

Could not verify if this works for other types of code as well, but if it does, please leave a comment.

Solution 4 - Visual Studio

Tried everything. The thing that WORKED is deleting the SUO file. It is a hidden file called SolutionName.v11.suo in the solution directory:

  1. Close the solution
  2. Make sure you can see hidden files.
  3. Erase the suo file.
  4. Reopen solution.

You will loose the solution desktop (no files will be opened automatically in the editor), but that's a small price to pay to get intellisense back :)

Solution 5 - Visual Studio

Delete the .suo file. Try this, it worked for me after all else failed.

Solution 6 - Visual Studio

I have the same problem. For me, selecting the end of the very last line of the file, and then saving the file (ctrl-s) fixes the problem.

Solution 7 - Visual Studio

I should first note that this hasn't happened to me since upgrading my RAM to 16GB.

This seems to happen when I copy/paste controls on a page. Another side affect of this is that the designer.vb file is not updated right away and I don't have access to those controls in code behind.

This is the order of steps that I go through:

  • If only 1 file/window appears to be affected, close/reopen that file.

In Visual Studio:

  1. Click Tools->Options->Text Editor->All Languages->General
  2. Uncheck "Auto list members"
  3. Uncheck "Parameter information"
  4. Check "Auto list members" (yes, the one you just unchecked)
  5. Check "Parameter information" (again, the one you just unchecked)
  6. Click OK

If this doesn't work, here's a few more steps to try:

  1. If still not working, close all windows and reopen
  2. If still not working, close/reopen solution
  3. If still not working, restart VS.

For C++ projects:
MSDN has a few things to try: MSDN suggestions

The corrupt .ncb file seems most likely.

From MSDN:

  1. Close the solution.
  2. Delete the .ncb file.
  3. Reopen the solution. (This creates a new .ncb file.)

(I haven't yet figured out why more drastic steps are required in some cases.)

  • Tested in VS 2013/15
  • I haven't had this issues since upgrading my RAM

Solution 8 - Visual Studio

I had some bad xaml code. It wasn't giving an error when compiling, but it was still preventing the intelliSense from working properly within the xaml file.

I removed the following code to fix the issue: Binding="{Binding ReturnCode & Info}"

the '&' being the problem

Solution 9 - Visual Studio

None of these worked for me, but I finally got it working by disabling Resharper. I'm not sure why it was necessary because I have another LS solution where intellisense is working fine. Just thought I'd post it in case someone else has the same problem I had.

Solution 10 - Visual Studio

I encounter the same problem and solve it. Keep that in mind, if you are working with Silverlight any incorrect XAML code can crash IntelliSense. I suggest if you are working with Silverlight, compile your project for detecting incorrect XAML codes and solve them in first step and if the problem continues then use above steps.

Solution 11 - Visual Studio

The problem is with the .vcproj files.

You will find if you switch to release mode from debug mode, build, then try intellisense it often works.

Close Visual Studio. If you search for the .vcproj files in your project, edit them and search for the first two instances of AdditionalIncludeDirectories. The value for this should look something like "..,...." rather than "../..".

Reopen your project, let the Intellisense finish building, then it should be fixed.

Solution 12 - Visual Studio

Steps to follow:

  1. Go to Tools Menu
  2. Click on "Import and Export Settings"
  3. Select "Reset all settings". Click Next
  4. Back up your Settings. Click Next
  5. Select your environment settings(e.g. Visual C# Development Settings). Click Finish.

No need to restart the Visual Studio.

Solution 13 - Visual Studio

I had an issue with razor Intellisense not working at all in one of my projects. None of the fixes above worked for me. I was finally able to resolve the issue by changing the webpages version in the web config to 2.0.0.0 instead of 3.0.0.0 shown below:

<appSettings>
   <add key="webpages:Version" value="2.0.0.0" />
   ...
</appSettings>

I hope this helps someone else.

Solution 14 - Visual Studio

None of the above helped to fix Intellisense on my devbox (VS2012). I even tried "devenv /resetuserdata" which resulted in necessity to reinstall all plugins.

Still, in C++ projects the code in #if ABC ... #endif blocks stay greyed out.

As a temporary workaround I modify #if ABC into #if 1//ABC, and then revert change back after I finish editing the block. Annoying...

EDIT: Few hours later I found better solution. I commented out "#define ABC 1" in the header file, and added "ABC=1;" to the Project Properties->C/C++->Preprocessor->Preprocessor Definitions. Then Intellisense started working correctly! The code blocks are not greyed out.

Solution 15 - Visual Studio

I was having a similar issue in Visual Studio 2013, I just cleaned the solution and then deleted 4: Close Visual Studio 2013 and delete this folder: %AppData%\Microsoft\VisualStudio\12.0 and it solved the problem.

Solution 16 - Visual Studio

I've isolated my issues to be with VS Power Tools corrupting the *.suo. Closing VS, deleting the .suo, then re-opening fixes the issue. It also deletes all personal settings for that solution.

Another, less destructive solution I've run across is to use the "Edit Project File" power command and then reload the project to get intellisense to work again.

Hopefully that helps others.

Solution 17 - Visual Studio

for VS2013 - ASP.NET MVC 5 Project, an easy way to fix this was to unload and reload the specific project.

Solution 18 - Visual Studio

For a Python project, I ended up deleting the hidden .vs folder, .sln file, and .pyproj file. I then recreated the project from existing code and Intellisense is working again.

Solution 19 - Visual Studio

Closing the tab that doesn't work did it for me.

p.s. I would save before hand, just in case of VS being weird ;)

Oh, and the shortcut is Ctrl+Alt+Space (to toggle between suggestion and standard completion modes)

Solution 20 - Visual Studio

I faced this problems multiple times and I still face it too.

The solution which worked for me was to reduce the length of the path where the solution is placed. I placed the solution closer to C drive (c:/code/your_project.sln) and it just solved the intellisense problem This always solves the problem.

Solution 21 - Visual Studio

None of the above worked for me. When examining closer, I noticed that intellisense worked on some files but not on all files. And then discovered it was only one file. Finally opened the .proj file which contained:

  <ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<Compile Include="Generator.cs" />
<Compile Include="PDFDocument2.cs" />
<None Include="PDFDocument.cs" />
<Compile Include="PdfDaemon.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

Of course intellisense doesn't work on the file that is not marked as to be compiled.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKroaXView Question on Stackoverflow
Solution 1 - Visual StudioSajjadHashmiView Answer on Stackoverflow
Solution 2 - Visual StudioDjibril NDIAYEView Answer on Stackoverflow
Solution 3 - Visual StudiousefulBeeView Answer on Stackoverflow
Solution 4 - Visual StudioAlon GingoldView Answer on Stackoverflow
Solution 5 - Visual StudioJason SteeleView Answer on Stackoverflow
Solution 6 - Visual StudioColinBurkeView Answer on Stackoverflow
Solution 7 - Visual StudioTony L.View Answer on Stackoverflow
Solution 8 - Visual StudioFesterView Answer on Stackoverflow
Solution 9 - Visual StudioAdam47View Answer on Stackoverflow
Solution 10 - Visual StudioCem SönmezView Answer on Stackoverflow
Solution 11 - Visual StudioAaron MiddletonView Answer on Stackoverflow
Solution 12 - Visual StudioViPuL5View Answer on Stackoverflow
Solution 13 - Visual StudioBrad GermainView Answer on Stackoverflow
Solution 14 - Visual StudioTerryView Answer on Stackoverflow
Solution 15 - Visual StudioKevinBBurnsView Answer on Stackoverflow
Solution 16 - Visual StudioSkowronekView Answer on Stackoverflow
Solution 17 - Visual StudioNikos TsokosView Answer on Stackoverflow
Solution 18 - Visual StudioMike BourbeauView Answer on Stackoverflow
Solution 19 - Visual StudioJames HefferView Answer on Stackoverflow
Solution 20 - Visual StudioMd NaushadView Answer on Stackoverflow
Solution 21 - Visual StudioPitchmattView Answer on Stackoverflow