Previous MAUI-Nuget-Coommunity-Toolkit MAUI Introduction Next

MAUI Check Tool

πŸ› οΈ The MAUI Check Tool (maui-check)

The MAUI Check Tool (maui-check) is a command-line utility designed to diagnose and fix common issues in your .NET MAUI development environment. It scans your system for required SDKs, tools, and dependencies to ensure you can build and run MAUI applications successfully.

1️⃣ Key Functions

  • Environment Validation: Checks for the correct versions of the .NET SDK, OpenJDK, Android SDK, and Xcode.
  • Automatic Fixes: Offers to automatically install or update missing components directly from the terminal.
  • Workload Management: Verifies that the required .NET workloads (like maui-android or maui-ios) are correctly installed.

2️⃣ Common Commands & Examples

Command Purpose
dotnet tool install -g redth.net.maui.check Install the tool globally on your machine.
maui-check Run the standard diagnostic scan on your environment.
maui-check --fix Runs the check and automatically applies fixes without prompting for user approval.
maui-check --skip openjdk Skips a specific check (e.g., if you already managed Java manually).
maui-check --verbose Provides detailed logs, useful for troubleshooting failed installations.

3️⃣ Modern Alternatives

While maui-check was essential during early MAUI previews, modern .NET development often uses built-in CLI commands for similar tasks:

  • Workload Check: Run dotnet workload list to see installed workloads.
  • Automatic Restore: Use dotnet workload restore inside a project folder to install exactly what that specific project needs.
  • Universal Update: Use dotnet workload update to bring all MAUI components up to date.

4️⃣ Troubleshooting with the Tool

If you encounter persistent build errors, you can run:

maui-check --force-dotnet

This forces the tool to re-run workload repair and install commands, even if it initially thinks they look correct.

πŸ“Œ If you'd like to dive deeper, I can:

  • πŸ” Show you how to troubleshoot specific Android SDK errors found by the tool.
  • βš™οΈ Explain how to use dotnet workload restore as a lightweight alternative.
  • πŸ’» Help you configure Visual Studio Code for MAUI if the tool confirms your environment is ready.
  • 🍎 Guide you through manual Xcode setup if the tool reports iOS missing on macOS.

πŸ› οΈ The MAUI Check Tool (maui-check)

The MAUI Check Tool (maui-check) is a command-line utility designed to verify that your development environment is correctly set up for .NET MAUI. It scans your system for required SDKs, workloads, emulators, and dependencies, and helps you fix issues quickly.

πŸ” What It Does

  • Checks if you have the .NET MAUI workload installed.
  • Verifies Android SDKs, emulators, and tools.
  • Confirms Xcode and iOS dependencies (on macOS).
  • Ensures Windows SDKs are present for Windows targets.
  • Suggests fixes or installs missing components automatically.

βš™οΈ How to Use It

1️⃣ Install the Tool

dotnet tool install -g redth.net.maui.check

2️⃣ Run the Tool

maui-check

This will start scanning your environment and display results in the terminal.


🧩 Example Outputs

Example 1: Environment Healthy

.NET MAUI Check
---------------
βœ” .NET SDK 8.0.100 installed
βœ” MAUI workload installed
βœ” Android SDK found
βœ” Xcode installed
βœ” Windows SDK found
All checks passed! πŸŽ‰

Example 2: Missing Android Emulator

.NET MAUI Check
---------------
βœ” .NET SDK 8.0.100 installed
βœ” MAUI workload installed
✘ Android Emulator not found
   Suggestion: Install Android Emulator via Visual Studio Installer

Example 3: Outdated Workload

.NET MAUI Check
---------------
βœ” .NET SDK 8.0.100 installed
✘ MAUI workload outdated
   Suggestion: Run 'dotnet workload update'

πŸš€ Why It’s Useful

  • Saves time by catching environment issues early.
  • Provides clear, actionable fixes.
  • Ensures consistency across platforms (Android, iOS, Windows, macOS).
  • Especially helpful when setting up a new machine or upgrading SDKs.
Back to Index
Previous MAUI-Nuget-Coommunity-Toolkit MAUI Introduction Next
*