Skip to content

Installation

Jung Hyun, Nam edited this page May 28, 2026 · 2 revisions

Installation

Cadenza ships as NuGet MSBuild SDK packages — there is no separate Cadenza installer. If you have the .NET SDK, you have everything you need to run a Cadenza script.

Requirements

Requirement Why
.NET SDK 10.0.300+ File-based apps + custom #:sdk resolution
Any OS the .NET SDK supports Windows, macOS, Linux (incl. Alpine via musl)
(Optional) An editor with the C# extension For full IntelliSense — see Editor Setup

Install the .NET SDK

Platform Command
Windows winget install Microsoft.DotNet.SDK.10
macOS brew install --cask dotnet-sdk
Linux Microsoft's per-distro install docs
Container mcr.microsoft.com/dotnet/sdk:10.0

Verify:

dotnet --version
# 10.0.300 or newer

Verify Cadenza works

Save this as hello.cs:

#:sdk Cadenza@1.0.15
WriteLine("Hello from Cadenza");

Run it:

dotnet run hello.cs

The first run takes a few seconds (NuGet restores the SDK and any dependencies); subsequent runs start in under a second.

Bootstrap with dotnet new

For starter scaffolding, install the Cadenza.Templates package:

dotnet new install Cadenza.Templates

Then:

dotnet new cadenza         -n mytool   -o ./mytool      # console (alias of cadenza-console)
dotnet new cadenza-worker  -n mydaemon -o ./mydaemon    # background service
dotnet new cadenza-web     -n myapi    -o ./myapi       # Minimal API
dotnet new cadenza-mcp     -n myserver -o ./myserver    # MCP server
dotnet new cadenza-agent   -n myagent  -o ./myagent     # AI agent

Each command produces a single .cs file (named after -n) pre-pinned to the latest matching SDK version, with a canonical starter pattern in the body.

The bare cadenza short name is an alias for cadenza-console.

Editor support (optional)

For full IntelliSense, install the standard C# extension for your editor. The C# Dev Kit is not required — Cadenza rides the base Roslyn LSP that the regular C# extension provides. See Editor Setup for VS Code, Cursor / Kiro forks, Rider, and Visual Studio.

Updating

Cadenza scripts pin exact versions via #:sdk Cadenza@1.0.15. To update a script, edit the version string in the directive. There is no global "cadenza-cli upgrade" — versions are per-script, which means a script you receive today still works tomorrow.

For shared updates across many scripts in the same folder, drop a global.json:

{
  "msbuild-sdks": {
    "Cadenza": "1.0.15",
    "Cadenza.Worker": "1.0.15",
    "Cadenza.Web": "1.0.15",
    "Cadenza.Mcp": "1.0.15",
    "Cadenza.Agent": "1.0.15"
  }
}

Then scripts can omit the version:

#:sdk Cadenza

Uninstall

dotnet new uninstall Cadenza.Templates

NuGet SDK packages and any restored Cadenza versions live in ~/.nuget/packages/cadenza* and clean themselves out when dotnet nuget locals all --clear is run.

See also

Clone this wiki locally