Programmatically use XSD.exe tool feature (generate schema from class) through .NET Framework classes?
I want to generate an XML Schema based upon a class, just as you can do with the Xsd.exe tool . E.g. xsd.exe /type: typename /outputdir:c:\ assmeblyname . Is there a way to do this by using classes in the .NET Framework instead of using the standalone tool? I'm sure I've seen information about task references or similar - i.e. something programmatic - that can be used in place of some of these standalone utilities, or that some standalone utilities get their features through the FCL or a Microsoft API. Found this which looks like it should do the trick... public static string GetSchema<T>() {