mamift / LinqToXsdCore

LinqToXsd ported to .NET Core (targets .NET Standard 2 for generated code and .NET Core 3.1, .NET 5+ for the code generator CLI tool).
Microsoft Public License
41 stars 15 forks source link

Replicate Codeplex Command Line #3

Closed ghost closed 5 years ago

ghost commented 5 years ago

Below is my old command line to generate one CS. I tried with gen -c and it generated 2 CS.

How do I do the same with LinqToXsdCore? I only want 1 CS from 4 XSD files.

c:\LinqToXsdBin\LinqToXsd.exe APIDataTypes.xsd APIEvents.xsd APIEventTypes.xsd APIResponse.xsd /fileName:OutputFile.cs

mamift commented 5 years ago

The original command line interface tool is still present in the repo: https://github.com/mamift/LinqToXsdCore/tree/master/XObjectsGenerator. If you really need to use the old style command-line interface, you can download the repo and build the XObjectsGenerator project to run the old style tool.

The new CLI has a --help argument for the different options it provides. Use linqtoxsd gen --help or linqtoxsd config --help.

For your particular issue, to output C# code to a single file use: LinqToXsd gen [file1.xsd] [file2.xsd] -o [code.cs]

ghost commented 5 years ago

That worked awesome! I appreciate the help. I will see if I can incorporate this and improve the performance of some XML creation routines with .NET Core.