I am using XSD2CODE with Visual Studio 2010. I know I can right click on a schema (XSD) file and generate the c# class from it.
What I would like to know is how can I generate the C# class when I have two schema files for a single XML file?
More information:
Perhaps I did not provide sufficient details in my original question.
Referencing question Why does XSD.EXE Create Two .XSD Files, and How to Use Them? , I am basically asking the same question for XSD2CODE instead of XSD.
With XSD I would use the command:
D:\>xsd response.xsd response_app1.xsd /classes
How do I do this with XSD2CODE, both in the VS 2010 GUI and/or the command line?
EDIT:
To answer the updated question, then it doesn’t seem that Xsd2Code was designed to handle more than one .xsd file at a time.
I gather this from:
Xsd2Code.exe <XSD File> [Namespace] [Output file name] [Options]Trunk\Xsd2Code.Console\EntryPoint.cs.Pascal Cabanel seems to be pretty active on Xsd2Code’s CodePlex site. Consider contacting him for a definite answer:
http://www.codeplex.com/site/users/view/pcabanel
In order to automatically create the supporting xsd2Code class files, you can click the .xsd file in the Solution Explorer and in the Properties window, write/paste Xsd2CodeCustomTool into the “Custom Tool” property.
In order to “see” data types from one .xsd file in the other, you can use an
includestatement.Here’s an example with a Person.xsd containing a data definition and Employees.xsd
include-ing Person.xsd and consuming thePersondata type.Person.xsd
Employees.xsd