133

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?

5
  • 2
    Does using Ctrl + Space works after this problem appears? Nov 14, 2012 at 9:25
  • 7
    No Ctrl+Space does have no effect Nov 14, 2012 at 9:57
  • 2
    Visual Studio uses independent implementations of IntelliSense for each of its supported languages, so the answer will likely depend on the particular language in use. In addition, several Visual Studio extensions alter, augment, or even completely replace the IntelliSense features for one or more languages, which is likely to change the answer provided here. Jun 14, 2013 at 18:34
  • Please vote in this uservoice to ask for a soft-reset chord to at least mitigate this: visualstudio.uservoice.com/forums/121579-visual-studio/…
    – mattmanser
    Oct 22, 2014 at 14:18
  • I have this issue. I did not install any plugins to VS or ever. Just opened and closed solutions and files in normal mode I do each time. So no clue what leads to such error. Jan 8, 2015 at 11:24

21 Answers 21

184
+500

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.

15
  • 6
    Couldn't to #1 as that menu item does not exist in my VS2012(?). Couldn't do #2 as that folder dit not exist. But after restarting VS2012 the problem disappeared. Mar 20, 2013 at 9:39
  • 21
    i can not find anywhere refresh local cache under there ? May 22, 2013 at 23:34
  • 6
    Same happened to me, none of the above worked, but closing all tabs did. That should be option one in this solution.
    – russds
    May 23, 2013 at 18:27
  • 1
    4 worked for the project in VS 2012, but the folder is not there in VS 2013 and I still have the issue there. I tried deleting the similar looking GeneratedSchemas instead but that didn't work either. Nov 30, 2013 at 16:48
  • 1
    @SajjadHashmi, what do you think of editing your answer to include a step for deleting the .suo file? There are several comments and up-voted answers in this thread that suggest, and so it seems like it would help others to have it in this main list. I proposed an edit to this question today to include that, but my edit was rejected (for reasons that leave me perplexed and a little discouraged). Anyway, please consider that minor addition to your answer.
    – pettys
    Feb 22, 2014 at 2:38
19

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.

1
  • 2
    This actually worked for me. Beats re-loading the whole solution or restarting visual studio. Oct 28, 2013 at 16:08
13

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 :)

3
  • Any ideas as to why this is occurring? I'm now deleting my sou files 3 or more times per day. I haven't isolated to any plug-ins, but I'm guessing it's Web Essentials or Power Tools.
    – Skowronek
    Jan 15, 2014 at 21:12
  • 1
    @Alon Gingold - isn't this just what I said back in November 13? Anyway, I have the Xamarin tools installed and wondered if anyone else with a problem with .suo file is also having this problem? Feb 5, 2014 at 15:52
  • I have xamarin installed and have nothing but this problem every day with visual studio 2013
    – TombMedia
    Feb 25, 2014 at 19:31
13

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.

1
  • 7
    You don't need to close the current solution. Instead, just WINDOW > Close All Documents.
    – yoyo
    Oct 10, 2013 at 23:24
12

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

1
  • Reminds me of the old days when you had to make the .ncb file read-only so VS 2005 couldn't use it and hang up while churning for 30 minutes on C++ headers. Mar 17, 2015 at 15:22
6

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.

0
2

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
1

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

1

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.

0
1

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.

1

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.

1
  • This fixed it for me after reinstalling VS did not.
    – SB2055
    Sep 16, 2016 at 18:56
1

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.

1

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.

0

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.

1
  • Visual Studio's default settings will gray-out all code that the compiler will skip due to compiler directives such as #if. If the defined constants change when your active configuration changes (for instance the #define debug is often set in Debug mode while not present in Release mode) then the portion of code which is grayed out will change.
    – Zarepheth
    Nov 4, 2015 at 14:13
0

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.

0

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.

0

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

0

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.

0

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)

0

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.

-1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.