Indigo Configuration and Intellisense

With Indigo, important service information is held in config files. Like, for example, the following:

<xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="">
            <service serviceType="BookServiceWinform.BookService">
                <endpoint address="http://localhost:8000/BookService/"
                    contractType="BookServiceWinform.IBookServiceContract" />

There you’ve got some pretty important stuff which ends up defining your service and its enpoints. So I’m thinking that I want intellisense support for this in my config file. But how to do it?

First, how is xml intellisense handled by VS2005? It is all done through xsd files. These documents around found here: C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas (if vs is installed on your c drive, of course). You can add intellisense support to your app.config files by modifying the DotNetConfig.xsd file located in that directory. This works very well with any xml file, really. Create your xsd, give it a namespace, reference that namespace in your xml file (like you see above), and you’ve got intellisense.

Ideally I would like to put two config files in my project, one for the regular configuration stuff and the other for my Indigo configuration. Well, I couldn’t figure out how to get that to work. When I had two config files my Indigo code was looking for the new config information in App.config, not my new Indigo.config. How to point it there...dunno yet.

So, what I’m doing now is just adding further schema definition to the DotNetConfig.xsd file. Seems to work just fine.

Another option, which I will probably move to, is to create another xml file to define my Indigo configuration, read that, and setup endpoints and such though code. That should work fine as well.

If anyone has any thoughts on the matter I would love to hear them, especially if anyone knows of any xsd’s already created for Indigo configuration.