NuGet Packages

Transpose ships as a set of NuGet packages: the MSBuild SDK that drives the build, the base library, and binding libraries for browser APIs.

Every package id matches its assembly name, with one exception: the base library's package is Transpose.BCL while its assembly stays Transpose — so the DLL is Transpose.dll and the runtime global in generated JavaScript is Transpose.

Required in every project

Transpose.Build.Target

The MSBuild SDK. A project references it as an SDK rather than as a package, and it runs the tps compiler once per project as part of dotnet build.

<Project Sdk="Transpose.Build.Target/*">

It passes --incremental by default; turn that off with <TransposeIncremental>false</TransposeIncremental>. It also refuses to pack a Debug build (TPS1001), since a Debug build emits a metadata-only assembly.

Transpose.BCL

The base library: the .NET base class library implemented for the browser, plus the code-generation attributes ([External], [Name], [Template], [Script], [ObjectLiteral], …). It also carries the JavaScript runtime tps.js as an embedded resource, which the build extracts into the output.

This is the only assembly the compiler references by default, and every project needs it.

Browser APIs

Transpose.Core

Strongly typed bindings for the DOM and the ES5/ES6 APIs — window, document, elements and events, XMLHttpRequest, fetch, Canvas, JSON, Promise, and the rest. Everything in it is [External], so it adds nothing to the bundle beyond the calls you make.

The two namespaces to know are Transpose.Core.dom (the DOM) and Transpose.Core.es5 (the JavaScript standard library). A using static Transpose.Core.dom; lets you write document.body directly.

Essential for anything that touches the page.

Extensions and libraries

Transpose.Newtonsoft.Json

The Json.NET API surface implemented in the browser: JsonConvert, [JsonProperty], [JsonIgnore], JsonSerializerSettings, custom converters, and polymorphic payloads. Its behaviour is verified against the real Json.NET by running every test case both ways and diffing the output — see JSON Serialization for the documented divergences.

Transpose.HttpClient

System.Net.Http.HttpClient for the browser, so API calls use the familiar .NET API. Note that it is subject to the browser's CORS rules like any other request.

Tooling

Transpose.Compiler

The compiler itself, as a dotnet global tool named tps. A normal build does not need it — the SDK resolves the compiler on its own — so install it only to drive the CLI directly, most commonly for watch mode.

dotnet tool install --global Transpose.Compiler

The published tool is ReadyToRun-compiled per platform, and dotnet tool install resolves the right build for your machine.

Transpose.Compiler.Library

The compiler as a library, for a host that wants to compile C# to JavaScript in-process: compile in-memory sources, build a real .csproj, or drive the watch loop from your own web server. This is how curiosity-cli serve --watch embeds Transpose.

It always ships at the same version as Transpose.Compiler — the two share the translator and are packed and pushed from a single release.

Not yet on NuGet

These live in the repository and have release pipelines, but have not been published yet. Nothing installs them today, so treat them as source rather than as dependencies:

Project What it will be
Transpose.Template A dotnet new template pack. Until it ships, start from the project file in Getting Started.
Transpose.WebGL2 Bindings for WebGL 2.0.
Transpose.Howler Bindings for Howler.js, an audio library.
Transpose.P2 Bindings for p2.js, a 2D physics engine.
Transpose.Placeholders Placeholder definitions of the code-generation attributes, for a shared project whose sources are compiled both by Transpose and by the regular .NET SDK. The regular build references it so that [External], [Name] and friends resolve while emitting nothing.

The minimum compiler version

Every assembly tps produces carries a small embedded stamp recording the compiler that built it, and the oldest compiler allowed to consume it. Before compiling, the compiler checks the stamp of every assembly the project binds against — every reference plus the base library — and fails with TPS0008 if one of them needs a newer compiler, naming the version required.

The reason is that a Transpose package's real payload is JavaScript, and how your own emitted code binds to that payload — names, overload numbering, the runtime helpers it calls — is decided by your compiler. An older compiler fed a newer package would produce a subtly wrong bundle instead of an error.

If you hit TPS0008, update the toolchain:

dotnet tool install --global Transpose.Compiler

and bump the Transpose.Build.Target SDK version in your project files to match.

Assemblies published before the stamp existed carry no stamp and are skipped, so older packages keep working.

Choosing versions

The Transpose.* packages are versioned in CalVer (yy.M.<build>) and are released independently, so their version numbers do not move in lockstep. Pin the newest published version of each, and bump the SDK version alongside them. Transpose.Compiler and Transpose.Compiler.Library are the one pair that always match.

The changelog records the published version of every package for each release.

© 2026 Curiosity. All rights reserved.