English | 简体中文
A .NET command-line tool for creating and maintaining Windows desktop applications with WinUI 3. Generate an editable project, add business pages and components, and maintain its infrastructure as the application grows.
Explore XamlNexus Gallery, a standalone app with interactive examples, tips, and offline browsing of the actual source templates. Gallery is maintained separately from the default generated application.
Run xamlnexus gallery with an official tool package to download, verify and launch its matching Gallery. After dotnet tool update -g XamlNexus, the next launch obtains the matching version; cached versions work offline. For source builds without a download manifest, follow the Gallery README's build instructions.
- Two architectures: a WinUI 3 application, or a WinUI 3 frontend with a WPF background host.
- Application foundations: ArcXaml, navigation, MVVM, dependency injection, configuration, and logging.
- Business page templates: blank, list, details, and form pages with navigation integration, loading states, validation, and editable data-source interfaces.
- Activation and lifecycle: launch arguments open business pages; unsaved-change guards cover sidebar navigation and window closing, with rollback on synchronous page-entry failure.
- Optional components: settings, SQLite, tray integration, application updates, and EditorConfig.
- AI development guidance: bundled CLI skills and application architecture/rules for Codex, Claude Code and Qwen Code.
- Project maintenance: preview changes, validate projects, diagnose configuration, and upgrade generated infrastructure.
Prepare Windows, the .NET 8 SDK, and the WinUI build environment.
dotnet tool install --global XamlNexus
xamlnexus --version
xamlnexus doctor --environmentUpdate or uninstall the tool:
dotnet tool update --global XamlNexus
dotnet tool uninstall --global XamlNexusThis README describes the 1.0.5 source. Check your installed tool with xamlnexus --version; if its published package lacks a feature described here, use the source-build instructions below.
xamlnexus new MyApp
cd MyApp
xamlnexus runPress Ctrl+C to stop before editing or running again. Edit MyApp.MainPanel/MainPage.xaml for the home page and MyApp.MainPanel/ViewModels/MainViewModel.cs for its state and logic.
Add a page, then run the application:
xamlnexus page add Workspace --dry-run
xamlnexus page add Workspace
xamlnexus page add Projects --kind list
xamlnexus page add ProjectDetails --kind details
xamlnexus page add ProjectEditor --kind form
xamlnexus runAfter stopping the application, add a component:
xamlnexus recipes
xamlnexus add sqlite
xamlnexus runrun builds and starts the appropriate executable in Debug/x64/unpackaged mode. It does not watch files or provide hot reload. Use run --dry-run to inspect the commands or run --no-build to use existing output.
Run xamlnexus without arguments for interactive setup, or select options explicitly:
xamlnexus new MinimalApp --profile basic
xamlnexus new DataApp --profile basic --features settings,sqlite
xamlnexus new HybridApp --preset hybrid| Option | Choices |
|---|---|
--preset |
winui (default) or hybrid |
--profile |
standard (default, includes settings) or basic (omits the full settings panel) |
--solution-format |
sln (default) or slnx (requires SDK 9.0.200+) |
Both profiles retain theme, localization, configuration, and logging infrastructure.
| Component | Purpose and availability |
|---|---|
settings |
Settings panel; included in standard, optional in basic |
sqlite |
Local data storage; hybrid data access runs in the host |
tray |
System tray integration; optional in WinUI, built into hybrid |
updater |
Application updates; optional in WinUI and depends on settings, built into hybrid; requires an update source |
editorconfig |
Editor formatting configuration |
Use xamlnexus add settings,sqlite to install multiple components. Already installed components are skipped. Read the generated component READMEs for configuration details; English and Simplified Chinese versions are included.
Run these commands from the project directory, or specify --project <directory>:
xamlnexus list
xamlnexus status
xamlnexus validate
xamlnexus doctor
xamlnexus update sqlite --dry-run
xamlnexus update --all --dry-run
xamlnexus upgrade --dry-run
xamlnexus --helpstatussummarizes environment, managed files, scaffold and Recipe updates, then suggests the next commands.update <id>updates one component,update --allupdates every outdated component in one transaction, andupgradeupdates scaffold infrastructure. Updating the CLI does not update existing projects.- Generated files are editable. Component update/removal checks tracked files; scaffold upgrades report merge conflicts.
--dry-runpreviews changes.--jsononly changes the output format and does not prevent writes.- Installer creation, signing, and update distribution are configured separately in the generated publishing files.
For an optional shortcut in the current PowerShell session:
Set-Alias -Name xn -Value xamlnexus
xn --help- Documentation index
- Quickstart
- AI development guidance: built-in CLI skills and generated application rules
- Command reference
- Architecture
- Profiles and capabilities
- Pages and ViewModels
- Application activation and single instance
- Navigation guards and entry-failure rollback
- Hybrid shutdown protection
- Standalone business workflow sample
- SQLite
- Settings and localization
- Scaffold upgrades
- Release policy
dotnet build ./src/XamlNexus/XamlNexus.csproj
dotnet ./src/XamlNexus/bin/Debug/net8.0/XamlNexus.dll --helpTo verify generated projects, use PowerShell 7 and the Windows/WinUI build toolchain:
./eng/Test-GeneratedProjects.ps1
./eng/Test-GeneratedProjects.ps1 -Profile standardEach invocation checks both architectures before and after adding a page and components, without launching the UI. Logs are written to .artifacts/generated-build-*/; generated projects are retained in the reported temporary directory.