Getting started

Create a starter app with the guided creator and run it:

dnx Runic.Create@<VERSION>
cd MyApp
dotnet tool restore
dotnet runic dev

dnx ships with the .NET 10 SDK and runs the creator without installing it. The creator asks for the project name, frontend, package manager, Window host, Linux GTK version (for Runic Desktop) and ViewModel library, then whether to add a test project, a Nix flake or the packaging manifests, and whether to restore the NuGet packages. Since SDK 0.20.0 it also asks how to build an Angular frontend (for Angular only) and which editor files to add. Since SDK 0.10.0 it asks on standard error, so redirecting standard output does not turn the questions off. Pass --yes, set RUNIC_COMMANDLINE_NO_INPUT=1 or redirect standard input to use the defaults; Escape or Ctrl+C at a question cancels with exit code 130. It installs Runic.Application.Templates, runs dotnet new runic-app, and prints both commands so you can recreate the project without questions:

dotnet new install Runic.Application.Templates@<VERSION>
dotnet new runic-app --name MyApp --frontend svelte --package-manager bun --host desktop --linux-gtk 3 --desktop-server native --view-models reactiveui
Option Choices Default
--frontend react, vue, svelte, sveltekit, angular react
--package-manager npm, pnpm, bun npm
--host desktop, cswebui desktop
--linux-gtk 3, 4 (Linux GTK version for desktop) 3
--desktop-server native, kestrel (server for desktop) native
--view-models reactiveui, toolkit (CommunityToolkit.Mvvm) reactiveui
--angular-build cli, vite (what builds Angular) cli
--editor none, vscode none

The switches --tests (a TUnit test project), --nix (a Nix flake), --packaging (the packaging/ manifests of dotnet runic package, to edit them) and --restore (a NuGet restore after creating the project) are off by default. --application-id sets the reverse-DNS application ID, such as org.example.Notes; by default it is com.example. and the project name's ASCII letters and digits. The creator also takes --force, to create the project in a directory that is not empty, and --no-install, to use the installed template instead of installing it.

New in SDK 0.11.0: --frontend sveltekit, a SvelteKit 3 frontend with @runic-artifex/sveltekit and @runic-artifex/svelte; --restore, --application-id, --force and --no-install. --packaging now copies the manifests of dotnet runic package instead of packaging/package.mjs. New projects write packages.lock.json on their first restore, which pins every NuGet package; commit it with the frontend's lock file. Outside Development they send a Content-Security-Policy without 'unsafe-eval'.

Since SDK 0.15.0, a Runic Desktop project serves its page from the native server, Runic.Desktop.NativeServer, so it needs only the .NET runtime, not ASP.NET Core, and its NativeAOT executable is about a quarter smaller. --desktop-server kestrel references Runic.Desktop.Kestrel instead, for an application that uses ASP.NET Core itself; see host selection.

Runic Desktop, the default host, opens a native window with the embedded WebView and native file dialogs. CS-WebUI opens a browser window and is supported on a best-effort basis. ReactiveUI is the primary ViewModel library; CommunityToolkit.Mvvm has its own idiomatic path. Choosing a host and MVVM library explains when to pick each.

Replace <VERSION> with the current release from the package catalog. You need the .NET 10 SDK and Node.js 24 with npm or pnpm, or Bun 1.4. Since SDK 0.11.0, Node.js 26 works too; dotnet runic doctor warns because Node.js 24 is the certified version. Since SDK 0.12.0, the build tools (the Bridge generator, the asset packer, dotnet runic and Runic.Create) roll forward to a newer major .NET, so a machine with only a newer .NET SDK, such as .NET 11, builds the app; .NET 10 remains the tested runtime.

Since SDK 0.14.0, Runic is built with .NET SDK 10.0.403 (runtime 10.0.14) for CVE-2026-111497 in the bundled Brotli decoder. Use .NET SDK 10.0.403 or later, Node.js 24.22.1 or 26.12.1, and Bun 1.4.4 or later, the template's default. Since SDK 0.14.0, the build warns with RUNICBRIDGE033 when the .NET SDK or Bun is older.

dotnet runic dev restores the .NET and frontend packages, builds the app, starts the frontend development server, and opens the app. Since SDK 0.11.0 it takes --launch-profile, --no-build, -e/--environment NAME=VALUE and -v/--verbosity, and confirms that the development server on its port is the one it started. Since SDK 0.12.0, on macOS it and dotnet run start the app from an ad-hoc signed development bundle in obj/, so notifications, login startup and the URL schemes work while you develop. dotnet runic doctor checks the prerequisites at any point. The generated README describes the project layout, the ignored Frontend/src/generated clients, publishing, and the project settings. The project creator builds the command for your choices and previews the generated files.

Angular: the Angular CLI or Vite #

Since SDK 0.20.0, --frontend angular --angular-build vite builds, serves and tests the same Angular frontend with Vite and the Analog Angular plugin (@analogjs/vite-plugin-angular) instead of the Angular CLI. The components are the same; Vite adds what the other frontends have:

  • with --translations, the Translations Vite plugin, so an edited message reaches the page under dotnet runic dev without a build;
  • the dock, the Vite DevTools dock with its Runic panel (see debugging);
  • the component build target, which an Angular guest of trusted component mode needs.

Keep the Angular CLI, the default, when you rely on its builders and ng build, ng serve and ng test, or would rather not depend on a third-party plugin. Choose Vite for the development loop above or a component guest. The Analog plugin uses the Angular compiler's internal API, so update Angular and the plugin together. vite build checks no types, so the template's build and typecheck scripts run ngc --noEmit, and its test runs on Vitest. See the template guide and building with the Angular CLI or Vite.

Debug in your IDE #

Since SDK 0.20.0, every project has Properties/launchSettings.json. Visual Studio and Rider list its profiles next to their Start button, and dotnet run uses the first, which starts the Window in Development: the browser's developer tools on the page and detailed Bridge errors. Since SDK 0.22.0 a CS-WebUI project has a second profile, (CS-WebUI script debugging), that opens its browser's DevTools Protocol port, and the Runic Desktop profile for WebView2 script debugging is gone: in Visual Studio, use Runic DevKit's Debug the Window. New projects also have a .vsconfig that names the Visual Studio components that debugging needs. --editor vscode adds .vscode/ with tasks for dotnet runic dev and debug configurations for the C# extension. To debug C#, run dotnet runic dev --no-window, wait for [dev] Ready, and press F5: the Window starts under the debugger and frontend edits still reach it. Since SDK 0.21.0, VS Code's JavaScript debugger also stops in the frontend's sources on Linux (Window + WebKitGTK (Linux), out of preview since SDK 0.23.0), as with WebView2 on Windows, and on every OS in Chrome (Window in Chrome, dotnet runic dev --browser, at an address of its own for each run since 0.23.0). Since SDK 0.22.0, Runic DevKit for Visual Studio debugs the C# code and the page in one session. Since SDK 0.23.0, a Runic Desktop project opens the developer tools from View ▸ Developer Tools in Development on Windows and Linux, and frontend compile errors appear in the IDE's error list. Debugging an application covers each IDE, the browser's developer tools, the dock and Runic Inspect.

Publish #

dotnet publish -c Release -r linux-x64

Use win-x64, osx-arm64 or another runtime identifier for other platforms; since SDK 0.12.0, macOS is supported on Apple silicon (osx-arm64) only. The publish folder contains the executable and a www folder with the built frontend; distribute the whole folder. Since SDK 0.11.0, RunicApplicationFrontendDelivery=Embedded packs the frontend into the application assembly instead, and dotnet runic package builds an installable package for each platform. To publish self-contained or with NativeAOT, then bundle, sign and package a Desktop app for Windows, macOS and Linux, follow ship a Desktop application.

Next steps #

The starter uses a .NET Window and View contract with a generated TypeScript client. The frontend owns its rendered components; .NET owns the typed model and operation lifetime.

The code blocks in these guides are checked against a pinned copy of the SDK template and examples by tests/guide-snippets.test.mjs.