Visual Studio 2012 - Intellisense sometimes disapp

2019-01-03 04:18发布

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?

21条回答
淡お忘
2楼-- · 2019-01-03 04:42

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.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-03 04:43

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.

查看更多
Lonely孤独者°
4楼-- · 2019-01-03 04:45

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.

查看更多
Juvenile、少年°
5楼-- · 2019-01-03 04:48

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.

查看更多
做自己的国王
6楼-- · 2019-01-03 04:48

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)

查看更多
贼婆χ
7楼-- · 2019-01-03 04:51

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.

查看更多
登录 后发表回答