Share via


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: https://brob.members.winisp.net/XSD%20Class%20Generator%20Add%20In.msi

 Enjoy!

 Use of included code sample is subject to the terms specified at https://www.microsoft.com/info/cpyright.htm

Comments

  • Anonymous
    July 25, 2007
    Great idea, but it only does .xml files and not .xsd files?
  • Anonymous
    July 25, 2007
    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.  
  • Anonymous
    May 23, 2008
    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?Thanks,//Agron
  • Anonymous
    June 19, 2008
    Can you upgrade for VS2008??? Thanks for this nice tool!!! :)
  • Anonymous
    September 26, 2008
    Like others I'd like to see 2008 version
  • Anonymous
    August 19, 2009
    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)"