I wrote about the xsd.exe tool before to generate XSD from XML:
- Generate XSD from XML – XSD.EXE versus on-line tools – take 2.
- Generate XSD from XML – XSD.EXE versus on-line tools.
But it is much more than that, as it is a great way of generating .NET (not only C# and VB.NET code) from XSD files:
- .NET/C#: Generating a WordPress posting categories page – part 1.
- .NET – Delphi Prism – How to generate wrapper classes code from XSD file.
Long ago, xsd.exe used to come as part of Visual Studio, but now it is installed with the various Microsoft Windows SDK versions (of which some are downloadable) which makes it harder to locate on your system.
The really bad thing is that Visual Studio cannot find XSD.exe as part of your project Build Events, as the PATH has not been set up correctly.
Starting xsd.exe from a Visual Studio Build Events
In my hunt for the xsd.exe location, I started with a small batch file to find the xsd.exe locations from the registry:





