I have a .NET 10 MAUI app configured with Aspire 13. When I start the Aspire project and the dashboard launches, I ensure that the emulator is running.
Steps to reproduce
- Start Visual Studio
- Create a new .NET MAUI App project
MauiApp1 - Select .NET 10 as the framework
- Choose "Enlist in .NET Aspire orchestration". Select Aspire version 13
- The project will be created
- Once created run the
MauiApp1.AppHostproject - The Aspire dashboard will open
- Wait until the mauiapp1 resource has started
- Start your Android emulator, if not already started
- Once the
mauiapp1resource has started, start the mauiapp1-android-emulator
Expected results
The Aspire project should open the app in the emulator. This process has been demonstrated in several videos from Gerald Versluis. But it does not work for me. I have reached out to him but no response so I decided to try here.
Actual result
The Aspire project throws an error in the console and does not start the app in the emulator.
I have used the default setup inside the AppHost.cs as well as used the AddMauiProject method, but in both cases I get the same error.
Version 1: default AppHost.cs file
var builder = DistributedApplication.CreateBuilder(args);
builder.AddProject<Projects.MauiApp1>("mauiapp1");
builder.Build().Run();
Version 2: updated AppHost.cs file using the AddMauiProject method
Include the below reference inside the MauiApp1.AppHost project:
<PackageReference Include="Aspire.Hosting.Maui" Version="13.0.0-preview.1.25560.3" />
AppHost.cs:
var builder = DistributedApplication.CreateBuilder(args);
var mauiApp = builder.AddMauiProject("mauiapp1", @"../MauiApp1/MauiApp1.csproj");
mauiApp.AddAndroidEmulator()
.WithOtlpDevTunnel();
builder.Build().Run();
Error the is displayed inside the Aspire dashboard for the mauiapp1-android-emulator resource
Successfully executed command 'resource-start'.
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\MauiApp1\MauiApp1\bin\Debug\net10.0-android'.
Failed to run as a self-contained app.
- The application was run as a self-contained app because 'C:\MauiApp1\MauiApp1\bin\Debug\net10.0-android\MauiApp1.runtimeconfig.json' did not specify a framework.
I have used Visual Studio 2022 Community, Visual Studio Insiders 2026 , Visual Studio 2026 Community, all with the same results.
I have used emulators: Pixel 7 API 36, Pixel 6 api 34, Pixel 5 api 30, all with the same results