Visual studio intellisense does not see new methods until restart?

拟墨画扇 提交于 2020-01-05 08:04:13

问题


I have a fairly large C# project with many files, classes etc. Everything works fine but if I move to say ClassA and add a new method or property and then move to another file in the solution and attempt to access it the intellisense reports it does not exist and underlines it in red. If I build the solution it will correctly build without errors and the red lines will disappear until I start editing the file again and then the red lines will come back and be reported as errors.

Saving the solution and all files does not help, but if I restart visual studio it will then work as intended unless I add more new methods/properties to an existing class then I have to restart again or suffer same problem.

I had this problem a long time ago with visual studio express and I could never fix it but it went away when I upgraded to a newer visual studio. Now the problem has come back with Visual Studio 2013 Ultimate on windows 8.1 and I can't find any solution again :(


回答1:


Verify that your intellisense options are still properly configured.

Go to Tools => Options => Text Editor => C# => Intellisense.

Make sure that under "Completion Lists"

(checked) Show completion list after a character is typed

Make sure that under "Selection in completion list" you have:

Committed by typing the following characters: {}[]().,:;+-*/%&|^!~=<>?@#'"\

and

(checked) Committed by pressing the space bar



来源:https://stackoverflow.com/questions/26830813/visual-studio-intellisense-does-not-see-new-methods-until-restart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!