Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate .xsd from a .cs using xsd.exe tool?

Tags:

xsd

xsd.exe

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?

like image 929
sam Avatar asked May 15 '12 10:05

sam


People also ask

How do I get WSDL from XSD?

we can generate wsdl file from xsd but you have to use oracle enterprise pack of eclipse(OEPE). simply create xsd and then right click->new->wsdl...

What is XSD exe?

The XML Schema Definition (Xsd.exe) tool generates XML schema or common language runtime classes from XDR, XML, and XSD files, or from classes in a runtime assembly.


1 Answers

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
like image 120
Steves Avatar answered Sep 29 '22 03:09

Steves