XSDClassgen v 2.0.3 Released
Folks,
After numerous promises to fix all the parsing issues, I finally had time to get to it. The most notable enhancements in XSDClassgen v 2.0.3 are
Better parsing engine: The new codebase has been completely re-written using the XMLSchemaImporter and XmlCodeExporter classes. More information could be found here. In short now all the grunt work of parsing the schema is handed over to the .net framework. This makes the parsing engine more robust.
Console Application: A command line version to generate the code. This opens the door to include code generation as an prebuild event (Project, Properties, Build Events, Pre-Build event command line) . So in a typical scenario, developer would create a pre-build event in the IDE and include it as part of every build. This eliminates the manual event of the developer having to create the source code file every time XSD is modified.
Sample command line
XSDClassGenConsole.exe /lang:c# /xsdpath:"D:\Current Projects\Schemas\DEM.xsd" /ns:"samples.Pubs" /filename:"Samples.Pubs" /folder:"D:\output" /partial /nullable /initialize
I have tested all the schemas that were reported to fail because of parsing issues in the previous builds and it seem to work fine now.
As usual feedbacks are welcome. One thing I have in mind for the future release is to have XSD integrated with the cutom tool generation option.
Download latest version of XSDClassgen