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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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:
- PetaTest framework is used for testing.
- Original idea http://mikehadlow.blogspot.com/2007/01/writing-your-own-xsdexe.html.
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.