Visual Studio 2012 - Intellisense sometimes disappearing / broken
Solution 1
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
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
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
Tried everything. The thing that WORKED is deleting the SUO file. It is a hidden file called SolutionName.v11.suo in the solution directory:
- Close the solution
- Make sure you can see hidden files.
- Erase the suo file.
- 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
Delete the .suo file. Try this, it worked for me after all else failed.
Comments
-
KroaX about 3 years
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?
-
Lasse Skindstad Ebert about 11 yearsCouldn'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.
-
MonsterMMORPG almost 11 yearsi can not find anywhere refresh local cache under there ?
-
russds almost 11 yearsSame happened to me, none of the above worked, but closing all tabs did. That should be option one in this solution.
-
yoyo over 10 yearsYou don't need to close the current solution. Instead, just WINDOW > Close All Documents.
-
Howard Renollet over 10 yearsThis actually worked for me. Beats re-loading the whole solution or restarting visual studio.
-
Jason Steele over 10 years4 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.
-
Codes with Hammer over 10 years@matt: #5 didn't help me. Intellisense still fails for me in this one solution. (But it's fine in a brand new solution.)
-
Skowronek over 10 yearsAny 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.
-
Jason Steele over 10 years@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?
-
ghiscoding over 10 yearsin my case it worked on closing only the problematic tab (and reopening it), while leaving the other ones open
-
pettys about 10 years@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.
-
dariusc about 10 yearsFor some reason, deleting the .suo file did help after I lost intellisense on .config files. Strange. Edit: using VS 2012
-
TombMedia about 10 yearsI have xamarin installed and have nothing but this problem every day with visual studio 2013
-
CramerTV about 10 yearsI just close VS and restart it.
-
MordechayS about 10 yearsVS2013: Options->All languages, uncheck the statement completion checkboxes, close the dialog. Open the dialog, check them back again.
-
Sem Vanmeenen almost 10 yearsVS2012. Right-click on the project, unload it. Right-click on it again and reload it. That did the trick for me.
-
Brad M almost 10 yearsI followed these steps after none of the above worked: blogs.msdn.com/b/willy-peter_schaub/archive/2010/09/15/… Had the same problem a day later, then used the /safemode switch, presto. I must have a bad extension. Also, #3 doesn't appear to be there in 2013 anymore.
-
Dzmitry Lahoda over 9 yearsI made closing all tabs, and got back intellisense. Then VS faked me into believe that I changed and updated code. But any build or rebuild did not help me debugging with reporting that I do not have source for changed file. So I closed VS and deleted suo, opened VS. It did something strange with file I modified and saved, but I god debugging back and things work.
-
Jon Harbour about 9 yearsReminds 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.
-
Zarepheth over 8 yearsVisual 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. -
SB2055 over 7 yearsThis fixed it for me after reinstalling VS did not.
-
Kenny Evitt over 7 yearsBased on this answer to a similar question, and my own (confirming) experience, unloading and reloading the Visual Studio project in Visual Studio also resolved this.
-
Michele almost 7 yearsMy intellisense came back when I found Ii had the project open twice in separate VS instances. Try to close your VS and re-open. Look for extra VS that are already open.