views:

185

answers:

5

Hey all!

My web.config no longer has Intellisense nor colour highlighting. It looks like a regular text document. Any idea why this would occur?

Thanks!

+1  A: 

Try to reset your settings : Tools > Import and Export Settings and choose Reset All settings. (maybe you want to make an export first if this does not work).

HTH

Markust
Already tried. No luck!
LookitsPuck
Oh. Try this instead: http://blogs.msdn.com/b/vcblog/archive/2009/05/27/rebuilding-intellisense.aspx
Markust
+1  A: 

You could try looking at the settings at:

Text Editor -> All Languages

There are some checkboxes for statement completion that need to be checked for intellisense. You can also try looking at the same settings but specific to XML files in that panel.

Alternatively, you can try this:

  1. Close your project
  2. Delete the .ncb file for it
  3. Re-open the project

This will cause Visual Studio to recreate the intellisense database, and might solve the problem.

byte
A: 

You could also try checking the extension on the file... Not saying I do this... but some people... forget to put an extension when saving and that can throw intellisense off.

Shaded
I just created a new project to test, and no luck there either.
LookitsPuck
A: 

You might be having this kind of problem (Scott Gu reporting on VS 2005):

"There is one gotcha to be aware of, though, that can sometimes cause intellisense for the web.config file to stop working in the IDE. This happens when a default namespace is added to the root element. For example, like so:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"&gt;

This doesn’t cause any runtime problems – but it does stop intellisense completion happening for the built-in .NET XML elements in the web.config file.

The bad news is that the built-in web admin tool (launched via the WebSite->ASP.NET Configuration menu item in VS 2005 and Visual Web Developer) always adds this xmlns namespace when it launches – so if you use this tool to manage users/roles you’ll end up having it added to your web.config file for you.

How to fix this gotcha:

To get intellisense back when you are editing the web.config file in the IDE, just delete the xmlns reference and have the root configuration element look like so:

<configuration>

Everything will then work fine again."

DOK
No luck. I do recall there being a popup prior to a restart in VS2K8, but can't recall what. It's only affecting the web.config files (that I notice so far). FWIW, there aren't any xmlns attributes added to my configs. This just occurred after that popup.
LookitsPuck
Did you check your Windows event logs just in case there's something useful there about that popup?
DOK
Haven't seen anything peculiar. Man, I wish I would have saved that popup.
LookitsPuck
Under Options for Text Editor>XML, I'm getting an "an error occurred loading this property pagE" for Formatting and Misc.
LookitsPuck
A: 

All,

I've fixed it by doing the following:

Opening up the VS2K8 command prompt and running the following command:

devenv /setup

Now we're back in business.

Thanks all!

LookitsPuck
Thanks for posting the answer.
Markust