This guide explains how the editor/tooling artifacts relate to one another and which one to choose for standalone editor hosting, VS Code usage, or in-app editing.
| Layer | Packages / artifacts | Purpose |
|---|---|---|
| Shared remote protocol | XamlToCSharpGenerator.RemoteProtocol |
reusable JSON-RPC framing and shared preview, MCP, and studio contracts |
| Semantic engine | XamlToCSharpGenerator.LanguageService |
completion, hover, definitions, references, rename, semantic tokens, inlay hints |
| Standalone LSP host | XamlToCSharpGenerator.LanguageServer.Tool |
packaged dotnet tool for editor integrations |
| Standalone MCP host | XamlToCSharpGenerator.McpServer.Tool |
packaged dotnet tool for workspace MCP queries |
| Preview helper host | XamlToCSharpGenerator.PreviewerHost |
preview helper transport plus preview MCP host for explicit preview lifecycle and hot reload control |
| VS Code integration | xamltocsharpgenerator.axsg-language-server |
client middleware, server startup, inline C# projections, editor integration |
| In-app editor host | XamlToCSharpGenerator.Editor.Avalonia |
AvaloniaEdit-based AXAML editor control |
Use:
This is the supported packaged experience. It bundles the client and uses the managed server plus editor-specific behaviors.
Use:
This is the correct entry point when you want a process-based server rather than embedding the semantic engine.
Use:
and, when you need to build your own host or adapter:
Use:
and optionally:
if the host is an Avalonia app and you want an editor surface as well.
LanguageServiceOwns:
Primary API entry points:
LanguageServer.ToolOwns:
dotnet toolUse the package guide for the standalone host surface:
The concrete host implementation is intentionally internal.
McpServer.ToolOwns:
Use the package guide for the standalone host surface:
RemoteProtocolOwns:
PreviewerHostOwns:
axsg.preview.hotReload and axsg.preview.updateThis is the correct artifact when preview itself is the remote-controlled system.
Owns:
This is documented narratively, not as generated API.
Editor.AvaloniaOwns:
Primary API entry point: