Spillgebees.NeTEx.Models 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Spillgebees.NeTEx.Models --version 0.0.1
                    
NuGet\Install-Package Spillgebees.NeTEx.Models -Version 0.0.1
                    
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="Spillgebees.NeTEx.Models" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Spillgebees.NeTEx.Models" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Spillgebees.NeTEx.Models" />
                    
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 Spillgebees.NeTEx.Models --version 0.0.1
                    
#r "nuget: Spillgebees.NeTEx.Models, 0.0.1"
                    
#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 Spillgebees.NeTEx.Models@0.0.1
                    
#: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=Spillgebees.NeTEx.Models&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Spillgebees.NeTEx.Models&version=0.0.1
                    
Install as a Cake Tool

Spillgebees.NeTEx

Note: This project was mostly AI-generated and is still a work in progress. It is not ready for production use.

<p align="center"> <img alt="GitHub Workflow Status (with branch)" src="https://img.shields.io/github/actions/workflow/status/spillgebees/netex/build-and-test.yml?branch=main&label=build%20%26%20test&style=for-the-badge" /> </p>

C# model classes and a generator tool for NeTEx (Network Timetable Exchange) XSD schemas, for use in .NET applications.

This repository provides two things:

  • Pre-generated model packages -- strongly-typed C# classes for each NeTEx schema version (as tagged in the NeTEx-CEN/NeTEx repository), ready to use with XmlSerializer.
  • A generator tool -- a CLI (netex-generate) that downloads NeTEx XSD schemas and generates C# classes with custom namespaces, for when you need full control.

Model packages

Install only the NeTEx version you need. Versions correspond to tags in the NeTEx-CEN/NeTEx GitHub repository.

NeTEx version Package NuGet
v1.2 Spillgebees.NeTEx.Models.V1_2 NuGet
v1.2.2 Spillgebees.NeTEx.Models.V1_2_2 NuGet
v1.2.3 Spillgebees.NeTEx.Models.V1_2_3 NuGet
v1.3.0 Spillgebees.NeTEx.Models.V1_3_0 NuGet
v1.3.1 Spillgebees.NeTEx.Models.V1_3_1 NuGet
All versions Spillgebees.NeTEx.Models NuGet

Generator tool

Package NuGet
Spillgebees.NeTEx.Generator NuGet

Quick start

Using the pre-generated models

# Install a single version
dotnet add package Spillgebees.NeTEx.Models.V1_3_1

# Or install all versions at once
dotnet add package Spillgebees.NeTEx.Models

Each version package contains three sub-namespaces:

  • .NeTEx -- NeTEx types (stop places, lines, journeys, fares, etc.)
  • .SIRI -- SIRI types (real-time information)
  • .GML -- GML types (geographic markup)
using Spillgebees.NeTEx.Models.V1_3_1.NeTEx;
using Spillgebees.NeTEx.Models.V1_3_1.SIRI;

var stopPlace = new StopPlace
{
    Id = "NSR:StopPlace:1234",
    Version = "1",
};

Using the generator tool

Install the tool globally:

dotnet tool install -g Spillgebees.NeTEx.Generator

Generate models for a specific NeTEx-CEN/NeTEx version tag:

netex-generate generate --version v1.3.1 --output ./Generated --namespace MyApp.NeTEx

This downloads the NeTEx schemas from the official repository and generates C# classes with the following sub-namespaces:

  • MyApp.NeTEx.NeTEx -- NeTEx types
  • MyApp.NeTEx.SIRI -- SIRI types
  • MyApp.NeTEx.GML -- GML types
Generator CLI reference
netex-generate generate [options]

Options:
  -v, --version <version>      NeTEx-CEN/NeTEx version tag (default: v1.3.1)
  --ref <ref>                  Git ref (branch or commit SHA), mutually exclusive with --version
  -o, --output <output>        Output directory for generated C# files (default: ./Generated)
  -n, --namespace <namespace>  Root C# namespace (default: NeTEx.Models)
  --clean                      Delete output directory before generating
  --verbose                    Enable verbose logging

netex-generate list-versions   List available NeTEx-CEN/NeTEx version tags

Building from source

The generated model classes are not committed to the repository -- they are generated at build time. To build locally:

# 1. Build the generator
dotnet build src/Spillgebees.NeTEx.Generator --configuration Release

# 2. Generate models for each NeTEx-CEN/NeTEx version tag
for tag_ns in "v1.2 V1_2" "v1.2.2 V1_2_2" "v1.2.3 V1_2_3" "v1.3.0 V1_3_0" "v1.3.1 V1_3_1"; do
  set -- $tag_ns
  dotnet run --project src/Spillgebees.NeTEx.Generator --configuration Release -- \
    generate --version "$1" --output "src/Spillgebees.NeTEx.Models.$2/Generated" \
    --namespace "Spillgebees.NeTEx.Models.$2"
done

# 3. Build and test
dotnet build Spillgebees.NeTEx.Models.slnx --configuration Release
dotnet test Spillgebees.NeTEx.Models.slnx --configuration Release

Supported frameworks

  • .NET 10.0

License

This project is licensed under the European Union Public Licence v. 1.2 (EUPL-1.2).

The NeTEx schemas are licensed under GPL-3.0 by CEN. EUPL-1.2 is compatible with GPL-3.0 per its compatibility clause.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.5 0 2/16/2026
0.1.4 32 2/15/2026
0.1.3 35 2/13/2026
0.1.1 34 2/13/2026
0.1.0 29 2/13/2026
0.0.5 31 2/13/2026
0.0.4 33 2/13/2026
0.0.3 32 2/12/2026
0.0.2 37 2/10/2026
0.0.1 37 2/9/2026