I have an XSD schema I need to include within my program, to validate some user input XML. The schema will need to be regularly updated. (By the programmer.)
My current method to include this is hold a reference to it within Resources.resx
- however, this doesn't seem ideal as it requires me to duplicate all my enum's between the XSD and the C#.
I've also looked at converting the XSD file to a runtime class using xsd.exe
- however, as I understand, this requires running a separate process outside of Visual Studio, which makes it more complex to update, and requires the process being detailed for future authors.
I can't imagine this is an unusual situation - is there a method by which this is commonly done, where I can remove the duplication in my current method, but still not have the need to manually process the schema on each update?