Installation
A Transpose project is an ordinary SDK-style C# project that references the
Transpose.Build.Target MSBuild SDK. The SDK runs the tps compiler as part of
a normal dotnet build, so there is no global-tool compiler to install and
no compilation server to keep running.
1. Create the project file
A Transpose project is a normal SDK-style .csproj. A minimal one looks like
this — replace each * with the latest published version.
<Project Sdk="Transpose.Build.Target/*">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Transpose.BCL" Version="*" />
<PackageReference Include="Transpose.Core" Version="*" />
</ItemGroup>
</Project>
netstandard2.0andnetstandard2.1both work.- The SDK inherits
LangVersion=latest; pin<LangVersion>only if a project needs an older one. Transpose.BCLis the base library (its assembly isTranspose.dll) and carries thetps.jsruntime.Transpose.Coreadds the DOM and ES5/ES6 bindings — see NuGet Packages.
Then add a Program.cs with a static Main — that is the entry point Transpose
emits and the runtime invokes. See
App Initialization.
A `dotnet new` template exists but is not published yet
The repository carries a Transpose.Template project, but it has not been
published to NuGet, so dotnet new install Transpose.Template does not resolve
today. Start from the project file above.
The base library's package id is `Transpose.BCL`
Every other package id matches its assembly name. The base library is the one
exception: the package is Transpose.BCL while the assembly stays
Transpose (so the DLL is Transpose.dll and the runtime global in generated
JavaScript is Transpose).
2. Build
cd MyWebProject
dotnet build
The compiled site lands under bin/<Configuration>/<tfm>/tps/ — the tps.js
runtime, your app.js bundle, the reflection metadata, any
resources, and a generated index.html.
Compiler errors are printed in MSBuild's canonical diagnostic format, so they appear in the IDE error list and are navigable to the file and line:
/src/MyWebProject/Program.cs(17,20): error CS0103: The name 'x' does not exist in the current context
`dotnet build` looks quiet by design
Since .NET 9, dotnet build uses MSBuild's terminal logger by default, which
renders only errors, warnings and a per-project summary — every progress line a
tool writes is dropped. Errors still surface. To see the compiler's full output,
build with dotnet build -tl:false, or read
obj/<Configuration>/<tfm>/tps.log, which the SDK writes on every build.
3. Run
The output folder is a static site, so any file server will do:
dotnet tool install --global dotnet-serve
dotnet serve ./bin/Debug/netstandard2.0/tps/
Open the URL it prints to see the application running.
For an edit-and-reload loop, use watch mode instead — it rebuilds on every save and reloads the browser for you.
Next steps
- Global Configuration — every
tps.jsonoption. - App Initialization — how
Mainand[Ready]are invoked. - Watch mode and incremental builds — the development loop.
- Migrating from h5 — porting an existing h5 project.