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条回答
【Aperson】
2楼-- · 2019-01-03 04:51

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

查看更多
疯言疯语
3楼-- · 2019-01-03 04:52

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.

查看更多
干净又极端
4楼-- · 2019-01-03 04:57

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
查看更多
登录 后发表回答