简体   繁体   English

字符串和方法/成员中的Intellisense问题

[英]Intellisense Issues in strings and methods/members

While coding in C# for Visual Studio 2010, I've noticed, that for some reason, after creating a delegate method, or using the "Extract method" menu option from Visual Studio, my IntelliSense decides it wants to go overboard. 在使用C#for Visual Studio 2010进行编码时,我注意到,由于某种原因,在创建委托方法或使用Visual Studio中的“提取方法”菜单选项后,我的IntelliSense决定要过关。 It starts activating inside a string, trying to complete stuff from outside (for instance, if I type "To be continued..." as I start to type continued, it suggests "const" as an option, thinking I'm still coding, and not recognizing I'm in a string. 它开始在字符串内部激活,尝试从外部完成内容(例如,如果我在键入“ continue ...”时继续输入,则建议使用“ const”作为选项,以为我仍在编码) ,但无法识别我在字符串中。

Also, when it starts doing the above, it also starts doing stuff like suggesting a while loop, while trying to do a Debug.WriteLine, and the Debug class has no members listed in the IntelliSense popup window, all it lists is base classes for my current namespaces. 另外,当它开始执行上述操作时,它还会开始执行诸如建议while循环的操作,同时尝试执行Debug.WriteLine,并且Debug类在IntelliSense弹出窗口中没有列出成员,它列出的所有内容都是我当前的名称空间。

Now if I push ctrl space manually, I get the proper intellisense options. 现在,如果我手动推动ctrl 空间 ,我将获得适当的智能感知选项。

Sometimes, closing all open files, and reopening them fixes it; 有时,关闭所有打开的文件,然后重新打开它们可以解决此问题; sometimes I have to completely close visual studio and reopen it to fix it. 有时我必须完全关闭Visual Studio并重新打开以进行修复。

Is anyone else experiencing similar issues, or know of any fixes to the issue? 是否还有其他人遇到类似的问题,或者知道该问题的任何解决方法?

Funnily enough, since extensions were suggested as being the cause of the issue, an extension is actually what fixed the issue for me. 有趣的是,由于扩展被认为是造成此问题的原因,因此扩展实际上是解决了我问题的原因。

It seems ReSharper overwrites default Intellisense handling, and the folks over at ReSharper seem to do it better than DevExpress, or Visual Studio, as even just installing Resharper, and uninstalling it seemed to fix it. ReSharper似乎会覆盖默认的Intellisense处理,并且ReSharper上的人们似乎比DevExpress或Visual Studio更好,甚至只是安装Resharper并卸载它也可以解决问题。

I've left ReSharper permanently installed on one dev environment, and have been using it consistently now for over a year, and haven't ran into this issue once, and I used to run into it weekly, or bi-weekly. 我已经将ReSharper永久安装在一个开发环境上,并且已经持续使用一年多了,并且从未遇到过此问题,我曾经每周或每两周遇到一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM