.NET MAUI to Android Emulator from CLI

Опубликовано: 23 Июль 2026
на канале: JFLHV
42
0

How to build a .NET MAUI project from the command line and deploy to the Android emulator.

-install dotnet:
winget install Microsoft.DotNet.SDK

install maui workload:
dotnet workload install maui

install maui-android workload:
dotnet workload install maui-android

install Microsoft Open JDK
winget install Microsoft.OpenJDK.17

Android SDK setup from command line:
   • Android SDK setup from Windows command line  

Start emulator:
emulator -avd Pixel_7_API_36

Start emulator fresh boot if having issues loading:
emulator -avd Pixel_7_API_36 -no-snapshot-load

Check device attached/get name:
adb devices

Run command:
dotnet build -f net8.0-android -t:Run -p:_DeviceName=emulator-5554