From maui-skills
Diagnoses .NET MAUI Hot Reload issues for C# Hot Reload, XAML Hot Reload, Blazor Hybrid across Visual Studio, VS Code, UI approaches like XAML and MauiReactor, and fixes like encoding and MetadataUpdateHandler.
npx claudepluginhub davidortinau/maui-skills --plugin maui-skillsThis skill uses the workspace's default tool permissions.
Systematically diagnose Hot Reload failures for .NET MAUI apps.
Guards .NET MAUI projects against deprecated, obsolete, or removed APIs in XAML/C#, Blazor Hybrid, and MauiReactor. Detects target frameworks/library versions and provides replacement patterns for code generation/review/editing.
Diagnoses and fixes .NET MAUI dev environment: .NET SDK/workloads, JDK, Android SDK, Xcode, Windows SDK. Dynamic NuGet version checks. For setup, build errors, post-update verification.
Builds .NET UI apps with Blazor (Server/WASM/Hybrid), MAUI (XAML/MVVM), Uno Platform (MVUX), WPF (.NET 8+), WinUI 3, WinForms, covering patterns, auth, testing, accessibility, localization, JS interop.
Share bugs, ideas, or general feedback.
Systematically diagnose Hot Reload failures for .NET MAUI apps.
.xaml changes) vs C# Hot Reload (.cs changes)CRITICAL: All .cs files must be UTF-8 with BOM encoding.
# Check if file has BOM (should show "UTF-8 Unicode (with BOM)")
file -I *.cs
# Find files without BOM
find . -name "*.cs" -exec sh -c 'head -c 3 "$1" | od -An -tx1 | grep -q "ef bb bf" || echo "$1"' _ {} \;
# Fix: convert to UTF-8 with BOM
sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' file.cs
# Or in VS Code: Open file > Save with Encoding > UTF-8 with BOM
Some changes always require app restart:
XamlCompilationOptions.Skip<!-- ✅ Correct — feature switch in .csproj -->
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<RuntimeHostConfigurationOption Include="MauiReactor.HotReload" Value="true" Trim="false" />
</ItemGroup>
// ❌ Wrong — v2 API, remove for v3+
.EnableMauiReactorHotReload()
⚠️ If migrating from MauiReactor v2, remove the EnableMauiReactorHotReload() call from MauiProgram.cs.
Key points — missing any of these breaks hot reload:
Build() methodICommunityToolkitHotReloadHandler on any page/view needing refreshOnHotReload() method is called automatically after C# hot reload.UseMauiCommunityToolkitMarkup() in MauiProgram.csThese changes always require restart:
@inject servicesProgram.cs or MauiProgram.csThese usually work without restart:
⚠️ CSS isolation: If .razor.css changes don't apply, verify the isolated CSS file is properly linked.
| UI approach | What reloads | Watch out for |
|---|---|---|
| XAML | .xaml files (instant) | Linker must be off on iOS; config must be "Debug" |
| C# code-behind | Method bodies only | Must re-trigger code path; rude edits require restart |
| MauiReactor v3+ | Component re-render | Need RuntimeHostConfigurationOption, not code call |
| C# Markup | Build() method body | Must implement ICommunityToolkitHotReloadHandler |
| Blazor Hybrid | .razor + .css | New components/services need restart |
references/hot-reload-setup.md).dotnet build -bl:build.binlog) help diagnose build-related hot reload failures.dotnet --info, workload list, binary log, and Hot Reload output..cs files are UTF-8 with BOMRuntimeHostConfigurationOption in .csproj (not code call)ICommunityToolkitHotReloadHandler implemented