-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
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:
- Configures the build (worker, web, or vanilla, depending on the SDK).
- Exposes a curated set of bare-name APIs via
global using staticso the script reads cleanly. - Wires up a host (for Worker / Web / Mcp / Agent) so a single
.csfile becomes a complete program.
No .csproj is generated. The script stays a 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
dotnetSDK 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).
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).
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.
Yes. Add #:package Name@Version lines.
#:sdk Cadenza@1.0.15
#:package Humanizer@3.0.0Yes — 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.
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.
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-imageCadenza.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.
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.
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>()).
Yes — dotnet new install Cadenza.Templates, then dotnet new cadenza-{console,worker,web,mcp,agent}. See Installation → "Bootstrap with dotnet new".
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.
- File issues / PRs on github.com/rkttu/cadenza.
- Add samples — every new
.csinsamples/should run cleanly withdotnet run. - Improve this wiki — clone
cadenza.wikidirectly or edit on GitHub's wiki UI.
Cadenza · MIT · .NET 10+ · github.com/rkttu/cadenza · No orchestra. No project. Just one file, playing solo.