Project Description

Generates .NET ConfigurationSection descendants by given XSD file.
Supports standalone .config files, nested element, element groups etc.

More details

I've personally found very useful to provide XSD scheme along with my own config sections, as therefore Visual Studio could check cofig file correctness, provide on-the-fly hints etc. On the other hand it is quite boring to maintain XSD scheme and .cs file on the same time, so I've wrote this utility to simplify maintenance.
xsd2cs.exe takes xsd file (in theory, it could be arbitrary XML Schema, provided that you're able to build meaningful configuration file against it), and build corresponding C# file to read this section. All the classes are generated as "partial" so could be easily extended.
An additional namespace process have been added to setup some processing parameters like target namespace, config file name, per-getter prefix etc.
All codegeneration is done thru CodeDOM, so it should not be hard to switch xsd2cs to another .NET language generation.

Current state

For now, xsd2cs could be ingtegrated into VS 2005 as a 3-rd party tool, and VS plugin is under development.

Last edited Nov 13, 2007 at 10:20 PM by yura_silver, version 2