简体   繁体   中英

How to rebuild VS2010 IDE Intellisense?

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?

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

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.

如果cs文件的构建操作未设置为编译,那么也会导致Intellisense在该文件中不起作用。

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

devenv /resetuserdata

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

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

This is what worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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