Avalonia Bootstrap and Lifetime
Start with:
../../references/00-api-map.md
../../references/01-architecture-and-lifetimes.md
../../references/05-platforms-and-bootstrap.md
../../references/06-msbuild-aot-and-tooling.md
../../references/41-xaml-compiler-and-build-pipeline.md
Load these when the request touches runtime services or platform shell integration:
../../references/48-toplevel-window-and-runtime-services.md
../../references/29-storage-provider-and-file-pickers.md
Workflow
- Choose the lifetime model first: desktop, single-view, or an activatable lifetime hook.
- Lock platform bootstrap early and keep platform options on
AppBuilder.With<T>(...).
- Confirm the XAML compiler, compiled-binding, trimming, and AOT setup before UI work grows.
- Keep startup wiring thin: app construction, service registration, and root-window or root-view composition only.
Rules
- Keep defaults pinned to Avalonia
11.3.12.
- Prefer compiled XAML and compiled bindings for production startup paths.
- Keep platform-specific code isolated to entrypoints and platform option configuration.
- Treat reflection-heavy startup helpers as opt-in tradeoffs and call them out explicitly.