How to rebuild VS2010 IDE Intellisense?

2020-03-02 01:43发布

some are working some are not working.

for example,

i did

using System.Web.Security;

MembershipUser myObject = Membership.GetUser();
        string UserID = myObject.ProviderUserKey.ToString();
        Response.Write(UserID);

the membershipuser is not highlighted in green. and System.Web. is not listing objects

but the code is working fine though. How do I make the intellisense work fine?

6条回答
聊天终结者
2楼-- · 2020-03-02 02:11

I'm using VS2010 and Project > Rescan Solution seems to do the trick, although it seems to take longer than normal. I suppose it's because it is rebuilding the entire cache, rather than selectively updating parts of it.

If you're using VsVim or other non-default keybinds, alt+P+S still does the trick.

查看更多
对你真心纯属浪费
3楼-- · 2020-03-02 02:18

I think the VS 2010 equivalent is Project>Rescan Solution – tletnes Jan 21 '13 at 22:50

This is what worked for me.

查看更多
戒情不戒烟
4楼-- · 2020-03-02 02:23

I'm using VS2005, but, I found that, in order convince it to build intellisense for boost, I had to specify the explicit path to the boost includes - shades of 1988! A relative path did not work. Dunno how this is going to affect the team, might try the environment variable trick to see if that's a workaround this poor indexing implementation.

https://social.msdn.microsoft.com/forums/en-US/fa8277f9-ecf0-40a6-8e0e-118e4615d5bc/intellisense-and-nonstandard-directories

查看更多
姐就是有狂的资本
5楼-- · 2020-03-02 02:27

The solution that worked for me is to use the following at the command line (or Start->Run):

devenv /resetuserdata

查看更多
闹够了就滚
6楼-- · 2020-03-02 02:35

Try resetting your Intellisense cache, Edit>Intellisense>Clear local cache.

Or try nuking it - delete your [SolutionName].sdf and .suo files

Edit:

VS 2010 equivalent is Project>Rescan Solution

查看更多
Evening l夕情丶
7楼-- · 2020-03-02 02:35

If the cs file's build action is not set to compile, that will also cause the Intellisense to not work within that file.

查看更多
登录 后发表回答