Skip to content
Jung Hyun, Nam edited this page May 28, 2026 · 4 revisions

FAQ

What does Cadenza actually do?

It's a family of MSBuild SDKs. Adding #:sdk Cadenza.X@<version> to the top of a .cs file tells dotnet run to pull that SDK, which:

  1. Configures the build (worker, web, or vanilla, depending on the SDK).
  2. Exposes a curated set of bare-name APIs via global using static so the script reads cleanly.
  3. Wires up a host (for Worker / Web / Mcp / Agent) so a single .cs file becomes a complete program.

No .csproj is generated. The script stays a script.

How is this different from dotnet-script or CS-Script?

Cadenza is not a separate hosted scripting runtime. It sits on .NET 10's native file-based apps. That means:

  • No separate install — the dotnet SDK is enough.
  • No maintenance treadmill against the upstream language — Cadenza evolves with .NET, not parallel to it.
  • The same IntelliSense story as a real .NET project — the Roslyn LSP just works (see Editor Setup).

Why does #:sdk require an exact version?

The MSBuild SDK reference resolver doesn't accept floating versions (1.*, @latest). Cadenza turns that into a feature: a script you receive today still runs in five years on the exact SDK its author tested against.

If you want a version-less UX across many scripts in the same folder, drop a global.json (see Directives#:sdk).

Will my IntelliSense work in Cursor / Kiro / VS Code forks?

Yes, with the community-rebuilt C# extension. The official Microsoft build is gated to Microsoft-branded IDEs; on forks, install dotnetdev-kr-custom/csharp from Open VSX. See Editor Setup for the full walkthrough.

Debugging on forks is restricted by the vsdbg license — for stepping, point at a netcoredbg-based build of the extension.

Can I add NuGet packages?

Yes. Add #:package Name@Version lines.

#:sdk Cadenza@1.0.15
#:package Humanizer@3.0.0

Can a Cadenza script grow into a real project?

Yes — dotnet project convert app.cs produces a regular .csproj. Like a cadenza in a concerto: improvised at first, eventually written down. Nothing's lost in the conversion.

Why is Cadenza.Agent not AOT-clean when everything else is?

Microsoft.Extensions.AI's function-invocation middleware uses reflection to bind tools, which NativeAOT can't see through. If you need AOT for an AI workload, compose Cadenza.Web + a manual IChatClient rather than Cadenza.Agent. The other four SDKs (Console / Worker / Web / Mcp) are AOT-clean.

My web/agent works locally but not in a container — what gives?

You're almost certainly bound to localhost (the loopback interface). Inside a container that's unreachable from outside.

Cadenza.Web: set the bind URL via the standard ASP.NET Core env var:

docker run -e ASPNETCORE_URLS=http://0.0.0.0:8080 -p 8080:8080 my-image

Cadenza.Agent: set the property in the script itself before Run():

Agent.HostName = "0.0.0.0";
Agent.Port     = 8080;
await Run();

See Deployment Container for the full story.

Where does OpenRouter fit? There's no UseOpenRouter

OpenRouter speaks the OpenAI wire format, so plug it in via UseChatClient with a custom OpenAI.Chat.ChatClient pointed at https://openrouter.ai/api/v1. The full recipe is on Cadenza Agent. Same pattern works for Groq, Together, Fireworks, and any other OpenAI-compatible provider.

Is Cadenza opinionated about logging / config / DI?

No. It uses the standard .NET Generic Host (or Web Host for Web/Agent), so logging is ILogger, config is IConfiguration, DI is IServiceProvider. The Tier 1 bare names are a thin convenience layer on top — drop down to the platform API any time. For Web, that's Web.App and Web.Services; for Worker, the DI overload of Run (or Worker.Service<T>()).

Is there a dotnet new template?

Yes — dotnet new install Cadenza.Templates, then dotnet new cadenza-{console,worker,web,mcp,agent}. See Installation → "Bootstrap with dotnet new".

How is the wiki kept in sync with releases?

The wiki source repo is github.com/rkttu/cadenza.wiki. Edit pages live on github.com/rkttu/cadenza/wiki, or clone the source repo for offline edits. The spec at spec.md (in the main repo's root) is the authoritative reference if the wiki and spec ever disagree.

How do I contribute?

  • File issues / PRs on github.com/rkttu/cadenza.
  • Add samples — every new .cs in samples/ should run cleanly with dotnet run.
  • Improve this wiki — clone cadenza.wiki directly or edit on GitHub's wiki UI.

See also

Clone this wiki locally