- Building the WPF app (`v2rayN/v2rayN`) requires the Windows Desktop targeting pack. Install via `dotnet workload install windowsdesktop` or use a Windows machine with Visual Studio build tools.
- Build all projects (no publish artifacts): `dotnet build v2rayN/v2rayN.sln -c Release`
- Run Avalonia app (Linux/macOS/Windows): `dotnet run --project v2rayN/v2rayN.Desktop -c Debug`
- Run WPF app (Windows only): `dotnet run --project v2rayN/v2rayN -c Debug`
- Formatting from `.editorconfig`: UTF-8, CRLF, spaces=4.
- C#: file‑scoped namespaces; System usings first; braces required; prefer `var` when type is apparent; PascalCase for types/members; fields/private locals use camelCase.
- Lint/format: `dotnet format` before pushing.
- XAML/Avalonia: keep views thin; move logic to ViewModels in `ServiceLib`/`*ViewModels`.
## Testing Guidelines
- Framework: NUnit with `GlobalHotKeys.Test`.
- Conventions: classes `*Tests`, methods `[Test]` with Arrange/Act/Assert; keep tests isolated and deterministic.
- Run locally with `dotnet test` and ensure coverage for hotkey registration/ID reuse.