Skip to content

Getting Started

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

Getting Started

Three minutes from a fresh shell to a running program.

1. Make sure you have the .NET SDK

Cadenza requires .NET SDK 10.0.300 or newer (file-based apps with custom #:sdk support). See Installation for OS-specific steps.

dotnet --version
# 10.0.300 or newer

2. Write a file

Pick the variant that matches what you want to build. Save as app.cs.

Console — print something:

#!/usr/bin/env dotnet run
#:sdk Cadenza@1.0.15

WriteLine("Hello from Cadenza");
foreach (var file in Glob("**/*.md"))
    WriteLine($"  {file}");

Web — serve an endpoint:

#!/usr/bin/env dotnet run
#:sdk Cadenza.Web@1.0.15

Get("/", () => "Hello, Cadenza");
await Run();

3. Run it

dotnet run app.cs

That's the whole loop. No dotnet new, no project file, no scaffolding. The first invocation restores the SDK; subsequent runs start in under a second.

4. Where to go next

See also

Clone this wiki locally