Codaxy.Xsd2 0.10.0

dotnet add package Codaxy.Xsd2 --version 0.10.0                
NuGet\Install-Package Codaxy.Xsd2 -Version 0.10.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Codaxy.Xsd2" Version="0.10.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Codaxy.Xsd2 --version 0.10.0                
#r "nuget: Codaxy.Xsd2, 0.10.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Codaxy.Xsd2 as a Cake Addin
#addin nuget:?package=Codaxy.Xsd2&version=0.10.0

// Install Codaxy.Xsd2 as a Cake Tool
#tool nuget:?package=Codaxy.Xsd2&version=0.10.0                

xsd2

Improved version of xsd.exe.

This version enables:

  • List based collections in generated types
  • Auto-capitalization of properties
  • Nullable attribute types
  • Removal of DebuggerStepThrough attribute

Usage:

Command line:

xsd2.exe <schema file> [/o:<output-directory>] [/ns:<namespace>] /all

Example running for embedding in your CSPROJ (C# project):

  <PropertyGroup>
    
    <XsdFilesPath>.\</XsdFilesPath>
  </PropertyGroup>

  <ItemGroup>
    <None Include="$(XsdFilesPath)**\*.xsd" />
  </ItemGroup>
  <ItemGroup>
    <XSDFile Include="$(XsdFilesPath)**\*.xsd" />
  </ItemGroup>
  <ItemGroup>
    
    <UpToDateCheckInput Include="$(XsdFilesPath)**\*.xsd" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="*.cs">
      
      <DependentUpon>$(XsdFilesPath)%(Filename).xsd</DependentUpon>
    </Compile>
  </ItemGroup>

  <Target Name="GenerateSerializationClasses" BeforeTargets="BeforeBuild" Inputs="@(XSDFile)" Outputs="@(XSDFile -> '%(Filename).cs')">
    <Message Importance="High" Text="Generating Schema classes: %(XSDFile.Identity)" />
    <Exec Command="$(Xsd2Exe) %(XSDFile.Identity) /o:$(ProjectDir) /ns:SomeNamespaces.Interfaces.Schema" />
  </Target>

  <Target Name="CleanGeneratedFiles" BeforeTargets="Clean">
    <ItemGroup>
      <_FilesToDelete Include="*.cs"/>
    </ItemGroup>
    <Delete Files="@(_FilesToDelete)"/>
  </Target>

Notes:

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.10.0 4,207 6/8/2020
0.9.10 762 5/7/2020
0.9.9 15,009 5/25/2015
0.9.8 1,205 5/19/2015
0.9.7 1,249 5/5/2015
0.9.6 2,382 12/1/2013
0.9.5 1,366 12/1/2013
0.9.3 1,650 8/4/2013
0.9.0 2,082 6/8/2013