Generate class from xsd.exe Visual Studio Add-In

I was using an XML file to generate a cs class for a project I was working on and everytime I changed the xml file I had to go through the vs command prompt and generate a new cs file and import it into my project.  What a pain!  So, I wrote a Visual Studio 2005 add-in that generates the files and adds it into your project.  This will save me A LOT of time of having to go back and forth.  There's a screen that kicks off on the first use to gather info on the path to your xsd.exe file and your preferred language.

Look under the "XML" menu option to see the "Create class from XML" command. 

Download Here:


 Use of included code sample is subject to the terms specified at

Comments (6)
  1. Kearns says:

    Great idea, but it only does .xml files and not .xsd files?

  2. Yes, it only does xml files with the plug in.  I can see your need for using it on xsd files, but I wrote it to simplify the two step process in creating a class from the xml file using xsd.exe.  Thanks for the suggestion and when I upgrade the code to VS2008 I’ll add that feature in there and post another version to download.  

  3. Agron says:

    Very close to something I was looking for. But, I need XSD->C++ something like CodeSynthesis but using XMLLite (the Microsoft Version).

    Is there a chance you could  make something like that?



  4. Shrenik says:

    Can you upgrade for VS2008??? Thanks for this nice tool!!! 🙂

  5. Tom says:

    Like others I’d like to see 2008 version

  6. huttonjd says:

    nice. If you like to generate class from your xsd, then in Buildevents->pre-build put in:

    "C:program filesMicrosoft Visual Studio 8SDKv2.0Binxsd.exe"  "$(ProjectDir)XSDFileName.xsd" /classes  /n:$(ProjectName)  /o:"$(SolutionDir)$(ProjectName)"

Comments are closed.

Skip to main content