Infosys Microsoft Alliance and Solutions blog

« Chris Brumme's weblog | Main | Settings in .net Fwk 2.0 »

Intellisense in VS Config Editor

Ever wondered how do you ever get intellisense while writing configuration files in the XML Config editor using VS?
Ever seen that Warning message which we comfortably ignore and which says “Could not find schema for the element <some_custom_config_section>”?

This is why.

All the schemas for VS are defined at C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\
Look for the file DotNetConfig.xsd
You can make changes to it, to add your own elements which will show up in intellisense in the VS Config file editor.

If you have your own schema definitions which you want to employ at an enterprise level, then you can add them to this file, so that you stop getting those irritating warning messages, as well as exploit the power of Intellisense for your custom config sections.

But make sure you have a backup of the original file before you mess anything up.

TrackBack

TrackBack URL for this entry:
http://infosysblogs.com/microsoft-mt/mt-tb.fcgi/32

Comments

I have some time looking for a solution to my problem to no avail. I want to add intellisense support for our custom sectionGroups in .config files. From what I can tell we must edit the DotNetConfig.xsd file in order to do this. I have tested this manually, pasting in XSD information for the new elements and restarting VS, which worked fine.

Had anyone written an application/scrip/installer which modifies the DotNetConfig.xsd or know the best way to start? Any advice is welcome.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)