Runic.Application.CsWebUi
0.6.0-preview.1
Runic.Application.Views.CsWebUi
Additional DetailsRenamed to Runic.Application.Views.CsWebUi in 0.7.0-preview.7. Namespaces are unchanged; replace the package reference.
See the version list below for details.
dotnet add package Runic.Application.CsWebUi --version 0.6.0-preview.1
NuGet\Install-Package Runic.Application.CsWebUi -Version 0.6.0-preview.1
<PackageReference Include="Runic.Application.CsWebUi" Version="0.6.0-preview.1" />
<PackageVersion Include="Runic.Application.CsWebUi" Version="0.6.0-preview.1" />
<PackageReference Include="Runic.Application.CsWebUi" />
paket add Runic.Application.CsWebUi --version 0.6.0-preview.1
#r "nuget: Runic.Application.CsWebUi, 0.6.0-preview.1"
#:package Runic.Application.CsWebUi@0.6.0-preview.1
#addin nuget:?package=Runic.Application.CsWebUi&version=0.6.0-preview.1&prerelease
#tool nuget:?package=Runic.Application.CsWebUi&version=0.6.0-preview.1&prerelease
Runic.Application.CsWebUi
Present Runic Windows and Views with CS-WebUI.
This is the default host of the runic-app project template.
dotnet add package Runic.Application.CsWebUi --prerelease
public sealed partial class MainWindow(CsWebUiBridgeWindow<MainViewModel> host)
: CsWebUiWindow<MainViewModel>(host);
var services = new ServiceCollection();
services.AddScoped<MainViewModel>();
services.AddRunicViews(); // generated in <ProjectName>.RunicBridgeComposition
using var provider = services.BuildServiceProvider();
using var window = provider.OpenWindow<MainWindow, MainViewModel>(host => new MainWindow(host));
window.SetRootFolder(Path.Combine(AppContext.BaseDirectory, "www"));
window.Show("index.html");
WebUiApplication.Wait();
OpenWindow creates a DI scope, resolves the Window's ViewModel, constructs
the Window, and attaches its generated Bridge; the Window owns the native
window, scope, and attachments until it is disposed or CloseAsync drains its
accepted operations. CsWebUiWindow<TViewModel> forwards SetRootFolder,
SetSize, Show, ShowWebView, StartServer, CloseAsync, and disposal to
its Host, a CsWebUiBridgeWindow<TViewModel>; Host.NativeWindow exposes
the underlying WebUiWindow.
What Show opens
Show uses WebUI's recommended presentation: an installed browser in app mode
(Chrome, Edge and other Chromium-based browsers work best; Firefox works without
app mode), then the system default browser, then the platform WebView.
ShowWebView always uses the WebView: the Edge WebView2 Runtime on Windows,
GTK 3 with WebKitGTK 4.1 on Linux, or WKWebView on macOS. For native windows
and platform services, use
Runic.Application.Desktop
instead.
Set RUNIC_APPLICATION_SERVE_ONLY=1 to start the local server without opening
anything. Show and ShowWebView then write RUNIC_APPLICATION_URL=<url> to
standard output and keep serving until a line is read from standard input or
the process ends, so a test harness or remote browser can drive the unchanged
application.
Build output
The package's build targets copy runic-cswebui.js into www/ next to the
built frontend. Load webui.js (served by WebUI) and runic-cswebui.js before
the generated client in index.html. The script adapts window.webui to the
generated client's transport contract.
A window-local CreateBridgeSession() retains one native binding for each route
name and swaps the active managed handler as Views change; an inactive route
returns disconnected. CS-WebUI cannot remove a native route registration
before its window closes. Retained page references reuse routes; new page
identities still add routes.
See the Runic.Application package guide for Windows, Views, generated clients, and build properties.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CsWebUi (>= 2.5.0-beta.4.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Runic.Application (= 0.6.0-preview.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.7.0-preview.6 | 1,158 | 10/9/2026 | |
| 0.7.0-preview.5 | 169 | 10/9/2026 | |
| 0.7.0-preview.4 | 89 | 10/8/2026 | |
| 0.7.0-preview.3 | 233 | 10/8/2026 | |
| 0.7.0-preview.2 | 96 | 10/7/2026 | |
| 0.7.0-preview.1 | 595 | 10/7/2026 | |
| 0.6.0-preview.1 | 887 | 10/5/2026 | |
| 0.5.0-preview.3 | 77 | 10/1/2026 | |
| 0.5.0-preview.2 | 81 | 9/25/2026 | |
| 0.4.0-preview.1 | 83 | 9/22/2026 | |
| 0.3.0-preview.1 | 98 | 9/11/2026 | |
| 0.2.0-preview.1 | 97 | 9/9/2026 |