We have a custom section in my app.config file related to our IoC container class. How can I get intellisense when editing the config file for this section, as well as getti
If you don't want to modify your DotNetConfig.xsd you could add the xsd configuration "inline".
In your case add the following attributes to the custom section
<ServiceContainers xmlns="your_xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="your_xmlns location_of_your_schema">
<Registration ....
</ServiceContainers>
This is useful while testing an xsd locally because location_of_your_schema could be a local path and when you are ready to production change location_of_your_schema to the public url of the xsd file.
Note that the xsi:schemaLocation attribute must contain pairs of strings separated by spaces where the first string in each pair is a namespace URI and the second string is the location of a schema.
XML Intellisense will not automatically work for a custom configuration section.
Visual Studio may report warnings on compilation complaining that the attributes of the custom configuration section are not defined. These warnings may be ignored.
If you want XML IntelliSense support for a custom configuration section (or if you just want the 'schema not found' warnings to disappear), add the following line to your DotNetConfig.xsd file immediately after the first <xs:schema ...> line (which is typically the second line in the DotNetConfig.xsd file).
<xs:include schemaLocation="YOUR_DIRECTORY\namespace.assemblyname.xsd"/>
The DotNetConfig.xsd file can be found in your Visual Studio 8 (or 9) installation directory in the Xml\Schemas subdirectory.