MetaObjects.Codegen 0.23.2

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

MetaObjects — C#

The C# port of the cross-language MetaObjects metadata standard. Targets .NET 8 (C# 12).

What it covers

  • Loader (MetaObjects) — multi-file JSON / YAML loader with overlay merge and cross-file extends: resolution.
  • Canonical serializer — byte-identical output to the TypeScript reference (the cross-language wire format).
  • YAML authoring front-end — sigil-free attrs + []-array suffix + fused-key default subtype + the D2 type-coercion guard (ADR-0006), via YamlDotNet. The cross-language interchange remains canonical JSON; YAML lowers to it.
  • Codegen (MetaObjects.Codegen) — idiomatic .NET emit: EF Core entities, an AppDbContext, ASP.NET minimal-API CRUD routes, filter allowlists, payload records, output parsers/prompts, TPH per-subtype surfaces and M:N navigation.
  • Render + verify (MetaObjects.Render) — Mustache render, payload value-object codegen and the verify drift gates, byte-identical with the other four ports against the shared render corpus.
  • CLI (MetaObjects.Cli) — packaged as a .NET tool invoked dotnet meta, with gen and verify verbs.
  • Conformance runners — auto-discover the shared corpora under fixtures/ (metamodel, yaml, render, verify, validation, api-contract, persistence, registry manifest). The corpora are the oracles — when a fixture goes red the port is wrong, never the fixture.

What it does NOT cover (out of scope)

  • Schema migrations. Per ADR-0015 the migration engine is owned by the TypeScript toolchain; the C# migrate engine and its migrate / --from-db CLI surface were removed. Use the Node meta CLI (meta migrate, meta verify --db) for schema. This is only about schema — C# codegen and runtime data access are first-class here.
  • Byte-equal generated code. Each language emits its own idiomatic output; byte equivalence is a goal at the render/canonical-serializer layer, not the codegen layer. Cross-port codegen parity is enforced behaviourally, through the api-contract corpus.
  • The dbProvider provider — the metamodel conformance corpus uses only metaobjects-core-types.

AI assistant context

To scaffold MetaObjects context files (.metaobjects/AGENTS.md, .metaobjects/CLAUDE.md, and .claude/skills/metaobjects-*/) into your project so your AI assistant understands how to author metadata and run codegen, use the Node meta CLI:

npx meta agent-docs --server csharp

(Running dotnet meta agent-docs prints this redirect and exits.)

Running

cd server/csharp
dotnet test

The test suite includes per-fixture Lint and Conformance theories over the shared corpus at ../fixtures/conformance/ plus unit tests for the parser, serializer, registry, tree, and loader.

Layout

  • MetaObjects/ — class library (MetaObjects.csproj)
    • Constants.cs, Errors.cs, Registry.cs, Provider.cs, DataType.cs, DataConverter.cs
    • Meta/MetaData.cs and the concrete node classes (MetaRoot, MetaObject, MetaField, etc.)
    • CoreAttrSchemas.cs, CoreTypes.cs — the metaobjects-core-types provider
    • Parser.cs, SuperResolve.cs, SerializerJson.cs
    • YamlDesugar.cs, ParserYaml.cs — YAML authoring front-end (ADR-0006)
    • Loader/IMetaDataSource, InMemoryStringSource, FileSource, DirectorySource, UriSource, MetaDataLoader (with FromDirectory/FromUris/FromString static factories), ValidationPasses
  • MetaObjects.Conformance.Tests/ — xUnit test project + conformance harness
    • ConformanceAdapter.cs, FixtureDiscovery.cs, OperationScript.cs, FixtureLint.cs, Navigator.cs, CapabilityBinding.cs, Result.cs, ExpectedFailures.cs, conformance-expected-failures.json, ConformanceTests.cs
    • YamlConformanceTests.cs, YamlDesugarTests.cs, yaml-conformance-expected-failures.json — YAML conformance + unit tests
    • Per-pipeline-stage unit tests (ErrorsTests, RegistryTests, TreeTests, ParserTests, SerializerTests, LoaderTests, SuperResolveTests, ValidationTests, …)
  • MetaObjects.Codegen/ — the .NET emit pipeline (Generators/ holds entity, db-context, routes, payload, filter-allowlist, output-parser/prompt, extractor, template) + CodegenRunner, GeneratorRegistry, CodegenDrift
  • MetaObjects.Render/ — Mustache render, payload value objects, verify
  • MetaObjects.Cli/ — the dotnet meta tool (gen, verify)
  • MetaObjects.Codegen.Tests/, MetaObjects.Render.Tests/, MetaObjects.Cli.Tests/ — per-project unit + golden tests
  • MetaObjects.IntegrationTests/ — the generated ASP.NET stack booted over HTTP against Testcontainers Postgres (api-contract + persistence corpora)
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.24.0 0 8/22/2026
0.23.2 79 8/17/2026
0.23.1 93 8/16/2026
0.23.0 84 8/15/2026
0.22.1 81 8/13/2026
0.22.0 83 8/13/2026
0.21.6 85 8/10/2026
0.21.5 92 8/10/2026
0.21.4 89 8/9/2026
0.21.3 92 8/9/2026
0.21.2 87 8/9/2026
0.21.1 91 8/9/2026
0.21.0 89 8/8/2026
0.20.16 92 8/7/2026
0.20.15 88 8/6/2026
0.20.14 100 8/6/2026
0.20.13 91 8/5/2026
0.20.11 104 8/2/2026
0.19.7 105 8/2/2026
0.19.6 94 7/27/2026
Loading failed