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.
<PackageVersion Include="Codaxy.Xsd2" Version="0.10.0" />
                    
Directory.Packages.props
<PackageReference Include="Codaxy.Xsd2" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#:package Codaxy.Xsd2@0.10.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Codaxy.Xsd2&version=0.10.0
                    
Install as a Cake Addin
#tool nuget:?package=Codaxy.Xsd2&version=0.10.0
                    
Install as a Cake Tool

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 6,650 6/8/2020
0.9.10 1,383 5/7/2020
0.9.9 16,826 5/25/2015
0.9.8 1,800 5/19/2015
0.9.7 1,848 5/5/2015
0.9.6 3,018 12/1/2013
0.9.5 2,000 12/1/2013
0.9.3 2,254 8/4/2013
0.9.0 2,774 6/8/2013