Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7535271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:15:58+00:00 2026-05-30T06:15:58+00:00

I am using XSD2CODE with Visual Studio 2010. I know I can right click

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:15:59+00:00Added an answer on May 30, 2026 at 6:15 am

    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:

    1. The command-line syntax

      Xsd2Code.exe <XSD File> [Namespace] [Output file name] [Options]
    2. A quick browse at the source code (download build 88331 from http://xsd2code.codeplex.com/SourceControl/list/changesets and look into 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

    • I’ll leave my prev. answer below

    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 include statement.

    Here’s an example with a Person.xsd containing a data definition and Employees.xsd include-ing Person.xsd and consuming the Person data type.

    • Note that since Employees.xsd already includes Person.xsd, you will only have to generate Xsd2Code for Employees.xsd.

    Person.xsd

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               targetNamespace="CommonNamespace"
               xmlns="CommonNamespace"
        >   
        <xs:complexType name="Person">
            <xs:sequence>
                <xs:element name="Name" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:schema>
    

    Employees.xsd

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               targetNamespace="CommonNamespace"
               xmlns="CommonNamespace"
        >
        <xs:include schemaLocation="Person.xsd"/>
    
        <xs:element name="Employees">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="Employee" type="Person" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    
    </xs:schema>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I auto generated an xsd file from the below xml and used xsd2code to
I'm still stuck with using arrays in XSD generated classes, as my XML schema
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using Java, how can I extract all the links from a given web page?
Using Visual C++ 2008. First time, I'm experimenting in crossing over from C# and
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using C#, I need a class called User that has a username, password, active
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.