tags:

views:

421

answers:

4

Consider:

http://msdn.microsoft.com/en-us/library/2tw134k3.aspx

When you are creating your custom types in the app.config do you get intellisense to aid you?

Or is it a case of programming in XML 'on your own'? It does not appear to be working for me, if this is the case that's fine but if intellisense is meant to work I know I'm doing something wrong.

Thanks

+4  A: 

No, not by default.

If you want intellisense, it is possible. Then you should write an XML schema for your configuration section, and reference it in the config file (put xmlns=yournamespace on the the configuration element and make sure Visual Studio knows where to find the schema).

driis
+1  A: 

Same for me. I don't usually find this to be problematic though, since the configuration sections typically are not very complicated.

I often put in a commented template element for custom sections, explaning the syntax, which may help in editing the config file when you revisit it after a couple of months and have a somewhat vaguer idea of the structure than when it was first implemented...

Fredrik Mörk
+1  A: 

There's an interesting project on Codeplex called Configuration Section Designer.

It's a VS plugin that extends VS and allows you to visually create your custom configuration schema. The kicker is: it also creates the XSD schema to go with it, so just by copying that to the appropriate folder under the VS install folder, you get intellisense - as if for free! :-)

Check it out - quite interesting.

Marc

marc_s
A: 

You need to create a XML schema file and drop them into C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas folder for VS2008 to recognize them.

Vasu Balakrishnan