I need a way to automatically regenerate *.cs files during build, based on *.xsd files, preferably without involving any custom add-ins. This needs to run on the CI build as well.
I'm not sure if I'm missing something obvious, or is this really tricky as it seems to me?
I use this script:
with a prebuild event of
This will recursively parse every .xsd file in a folder in the project root called
XSDs
, and will assign a namespace based on the folder structure.