How to generate xsd from c # class file using visual studio command line?

I use the following command, but it does not work:

C: \ Program Files (x86) \ Microsoft Visual Studio 8 \ VC \ bin> xsd / c / l: cs SubsystemReg.cs

Let's say this is my class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PaymentControllerGUI
{
    public class EmptyClass
    {
    }
}

and I'm trying to do it.

C: \ Program Files (x86) \ Microsoft Visual Studio 8 \ VC \ bin> xsd / c / l: cs EmptyClass.cs

Error:

invalid command line argument: 'SubsystemReg.cs'

+4
source share
1 answer

XSD.exe, DLL, , CS-, .

, SubsystemReg.dll, XSD.exe :

XSD.exe C:\SubsystemReg.dll

MSDN:

XML- myAssembly.dll schema0.xsd .

xsd myAssembly.dll  

UPDATE:

XSD DLL , , :

xsd.exe YourAssembly.dll /type:YourNamespace.YourType

:

xsd.exe PaymentControllerGUI.dll /type:PaymentControllerGUI.EmptyClass
+7

Source: https://habr.com/ru/post/1530194/


All Articles