Skip to content

A tool to generate XSD files from .NET Core assemblies.

License

Notifications You must be signed in to change notification settings

exocad/XsdGeneratorNet

Repository files navigation

Xsd Generator for .NET Core

A tool to generate XSD files from types defined in .NET Core assemblies. The Microsoft XSD Tool offers the same functionality for .NET Framework assemblies only, which is why this tool has been written.

License

MIT

Requirements

The .NET 6 Desktop Runtime must be installed on the local machine. Alternatively, the Runtime can be installed with winget by opening a PowerShell and executing:

winget install Microsoft.DotNet.DesktopRuntime.6

More details can be found here: Download .NET 6

Usage

The command line arguments are compatible with the original tool with some additional options.

XsdGeneratorTool ASSEMBLYPATH[ ASSEMBLYPATHx]** [/type:TYPENAME[,TYPENAMEx]*] [/output:OUTPUTDIR] [/skip-validation] [/help]

Command Description Example
ASSEMBLYPATH One or more assemblies with types to export. Paths with spaces must be surrounded with a " character. MyAssembly.dll
/type:TYPENAME[,TYPENAME]** If omitted, all suitable types will be exported. Otherwise, types matching the given names will be exported. When a typename ends with .*, all types whose full name starts with the given string will be included. /type:MyType,MyNamespace.*
/output:OUTPUTDIR Specifies the directory to copy the generates XSD files to. /output:C:\Temp
/skip-validation If specified, XML schema validation warnings will be ignored and not logged. Errors will still abort the export operation, though.
/help Prints a usage hint

Example

XsdGeneratorTool MyDotNetCoreAssembly.dll /type:MyType /output:C:\MyXsdFiles

References