Test .NET MAUI Preview SDKs Locally with global.json sdk.paths
Trying a new .NET MAUI preview usually means installing an SDK and workloads globally — and then untangling your machine when something breaks. Gerald Versluis walks through a safer approach using the new global.json sdk.paths feature in .NET 10, which keeps preview SDKs local to a single repository.
What you’ll learn
- The minimal setup: installing a preview SDK into a
.dotnet/folder with the officialdotnet-installscripts and pointing your repo at it viasdk.paths - Keeping the
"$host$"fallback so the repo still uses your machine-wide SDK when appropriate - A team-friendly
global.jsonwithversion,allowPrerelease,rollForward, and a helpfulerrorMessage, plus a small install script for consistent setup - Clean teardown: removing
.dotnet/to undo the experiment, and why.dotnet/belongs in.gitignore - The important caveats: you need a .NET 10+ host, workloads must be installed through the local
./.dotnet/dotnetbinary, and per-OS realities for MAUI platform workloads - The new
setup-local-sdkskill that gives GitHub Copilot a repeatable checklist for this workflow
If you like testing .NET MAUI previews early but hate breaking your main machine, this write-up gives you a boring-to-undo workflow. Read the full post for the exact scripts, global.json examples, and the official docs links.