7

I have a .cs file that contains a subclass of XTypedElement and IXMetaData. Microsoft has a tool that generates XSD files automatically from managed code, but it doesn't accept .cs files. It only accepts .exe, .dll, .xdr, .xml, and .xsd.

How do I convert my .cs file into a .xsd file with this tool?

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
sam
  • 287
  • 5
  • 12

1 Answers1

3

You first need to compile it into dll or exe file, i.e. .NET assembly, and then use this as an input for xsd.exe

If you want to convert only a specific class, use the following command:

xsd bin\Release\MyAssembly.exe /type:The.FullName.Of.YourType
Steves
  • 2,798
  • 21
  • 21