This project has moved and is read-only. For the latest updates, please go here.

Can I use it in my App.Config?

Jan 14, 2010 at 8:35 PM


I must say, after trying to do some more complex custom configuration settings for the first time, I was glad to stumble upon this tool.  I love it - mostly!

What I mean is it seems to work great.  However, I do NOT want an extra .config file if I can help it.  I would like to be able to just reference the Config project or .dll (as created in the tutorial) and just add to the configSections element.  Then somewhere in the App.confg actually get the intellisense just like all of the standard sections get.

Is this possible it CSD's current state?  Am I just missing something?

Thank you for what you have though!


Jan 14, 2010 at 9:27 PM

To get intellisense in a configuration file, you must put the right namespace on the configuration element, just like in the example configuration file, e.g.

<SomeSection xmlns="theNameSpace">
and the generated XML schema which describes that namespace must either be in the same folder as the .config file is, or it must be placed in <Program Files>\Microsoft Visual Studio 9.0\Xml\Schemas. That should be all it takes. Let me know if you need more help.

Jan 14, 2010 at 9:58 PM

One more thing, to get it to work in your App.config, your project must (naturally) have a reference to the custom configuration dll, and the <section> element in the <configSections> element must have a full type attribute, like so:

		<section name="SomeSection" type="MyConfigSectionHandler.SomeSection,MyCustomConfigurationHandler,Version=,Culture=neutral,PublicKeyToken=null" />
	<SomeSection xmlns="theNameSpace">