Making XSD types available at runtime
Hey, im creating a visual studio extension to deal with some annoying XML, and ive run into an issue. When my XML file includes an XSD, i want to automatically generate all complex types in that schema as classes, and make them available for code completion in the active project, but i have no idea how to go about this.
3 Replies
Don't know much about vs extensions, but it sounds straight forward.
1. Parse the XSD file
2. Map that data to c# class declaration
3. Write this to file(s)
yeah the issue is that I don't necessarily want them to clutter the main project, and from what i understand it seems like I'll have to compile them elsewhere and reference the new assembly
And now that I'm saying this I realise I can just throw that assembly into obj
Yeah if you don't want to clutter the main project that's a good option.