Skip to content

Enable Native AOT for Aspire Dashboard - #19439

Draft
Javier Calvarro Nelson (javiercn) wants to merge 1 commit into
microsoft:mainfrom
javiercn:javiercn/dashboard-native-aot
Draft

Enable Native AOT for Aspire Dashboard#19439
Javier Calvarro Nelson (javiercn) wants to merge 1 commit into
microsoft:mainfrom
javiercn:javiercn/dashboard-native-aot

Conversation

@javiercn

Copy link
Copy Markdown
Contributor

Move the Dashboard to .NET 11, publish RID-specific Native AOT executables, and carry the standalone Dashboard through CLI bundle discovery, packaging, signing, and CI while preserving legacy bundle fallback.

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Move the Dashboard to .NET 11, publish RID-specific Native AOT executables, and carry the standalone Dashboard through CLI bundle discovery, packaging, signing, and CI while preserving legacy bundle fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 17, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Separates the Dashboard from aspire-managed, retargets it to .NET 11 Native AOT, and integrates the executable into CLI bundles and release infrastructure.

Changes:

  • Publishes and launches a standalone Native AOT Dashboard with legacy fallback.
  • Updates bundle creation, packaging, signing, and CI.
  • Adds supporting source-generation and discovery changes.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/CreateLayout/Program.cs Adds Dashboard to bundle layouts.
tests/Infrastructure.Tests/PowerShellScripts/DownloadNativeArchivesTests.cs Tests Dashboard artifact downloads.
tests/Aspire.Hosting.Tests/Dashboard/DashboardEventHandlersTests.cs Tests native executable launching.
tests/Aspire.Dashboard.Tests/Telemetry/DashboardTelemetryServiceTests.cs Removes redundant import.
tests/Aspire.Dashboard.Tests/Integration/TelemetryApiTests.cs Removes redundant import.
tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs Updates .NET 11 expectations.
tests/Aspire.Dashboard.Tests/Integration/FrontendBrowserTokenAuthTests.cs Removes redundant import.
tests/Aspire.Dashboard.Tests/BlazorAssetsTests.cs Tests framework-provided Blazor script.
tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj Retargets tests to .NET 11.
tests/Aspire.Dashboard.Components.Tests/Aspire.Dashboard.Components.Tests.csproj Retargets component tests.
tests/Aspire.Cli.Tests/ProfileCaptureOptionsTests.cs Tests Dashboard path resolution.
tests/Aspire.Cli.Tests/Layout/LayoutProcessRunnerTests.cs Updates Dashboard terminology.
tests/Aspire.Cli.Tests/Commands/DashboardRunCommandTests.cs Tests native Dashboard invocation.
src/Shared/IConfigurationExtensions.cs Adjusts Dashboard compilation.
src/Shared/BundleDiscovery.cs Defines Dashboard executable metadata.
src/Aspire.Managed/Program.cs Removes Dashboard subcommand.
src/Aspire.Managed/Aspire.Managed.csproj Removes Dashboard dependency.
src/Aspire.Hosting/Dcp/DcpOptions.cs Documents legacy terminal fallback.
src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs Launches native Dashboard directly.
src/Aspire.Hosting.Tasks/ResolveAspireCliBundle.cs Discovers standalone Dashboard.
src/Aspire.Dashboard/ServiceClient/DashboardClient.cs Adds AOT-safe SSL binding.
src/Aspire.Dashboard/Serialization/DashboardJsonSerializerContext.cs Adds generated JSON metadata.
src/Aspire.Dashboard/Program.cs Adds watchdog-aware async startup.
src/Aspire.Dashboard/Otlp/Http/OtlpHttpEndpointsBuilder.cs Supports request generation visibility.
src/Aspire.Dashboard/DashboardWebApplication.cs Adds AOT-safe binding and serialization.
src/Aspire.Dashboard/Configuration/DashboardOptions.cs Adds bindable ClaimAction constructor.
src/Aspire.Dashboard/Components/BlazorScript.razor Uses SDK Blazor static asset.
src/Aspire.Dashboard/BlazorAssets.targets Removes custom Blazor asset generation.
src/Aspire.Dashboard/Aspire.Dashboard.csproj Enables .NET 11 Native AOT.
src/Aspire.Cli/Projects/PrebuiltAppHostServer.cs Injects standalone Dashboard path.
src/Aspire.Cli/Projects/DotNetBasedAppHostServerProject.cs Updates local Dashboard framework path.
src/Aspire.Cli/Projects/DotNetAppHostProject.cs Uses layout Dashboard discovery.
src/Aspire.Cli/Profiling/ProfileCaptureService.cs Profiles via standalone Dashboard.
src/Aspire.Cli/Layout/LayoutConfiguration.cs Adds Dashboard path fallback.
src/Aspire.Cli/Commands/DashboardRunCommand.cs Runs native or legacy Dashboard.
NuGet.config Adds approved .NET 11 feed.
global.json Selects .NET 11 RC SDK.
eng/Versions.props Updates .NET 11 package versions.
eng/Signing.props Signs Dashboard executables.
eng/scripts/download-native-archives.ps1 Downloads Dashboard artifacts.
eng/pipelines/templates/build_sign_native.yml Builds, signs, and packages Dashboard.
eng/pipelines/azure-pipelines.yml Assembles Dashboard release artifacts.
eng/dashboardpack/Sdk.targets Resolves native macOS executable.
eng/dashboardpack/Common.projitems Produces RID-specific AOT packages.
eng/Bundle.proj Publishes Dashboard during bundling.
docs/specs/bundle.md Documents the new bundle layout.
Directory.Packages.props Selects .NET 11 dependencies.
Directory.Build.props Updates local Dashboard path.
benchmarks/Aspire.Dashboard.Benchmarks/Aspire.Dashboard.Benchmarks.csproj Retargets benchmarks to .NET 11.

Comment on lines +1061 to +1064
var dashboardPath = _layout.GetDashboardPath();
if (dashboardPath is not null)
{
startInfo.Environment[BundleDiscovery.DashboardPathEnvVar] = managedPath;
startInfo.Environment[BundleDiscovery.DashboardPathEnvVar] = dashboardPath;
- script: |
chmod +x $(Build.SourcesDirectory)/artifacts/bin/Aspire.Managed/Release/net10.0/${{ targetRid }}/publish/aspire-managed
displayName: 🟣Restore execute permission on aspire-managed
chmod +x $(Build.SourcesDirectory)/artifacts/bin/Aspire.Dashboard/Release/net11.0/${{ targetRid }}/publish/Aspire.Dashboard
@@ -3,29 +3,24 @@
<PropertyGroup>
<!-- This list of runtimes needs to match the set of runtimes specified in eng/workloads/workloads.csproj -->
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
Comment on lines +19 to +20
<WarningsNotAsErrors>$(WarningsNotAsErrors);ASPDEPR005;BL0011;BL0012;BL0016;CS0618;IL2026;IL2057;IL2062;IL2065;IL2067;IL2072;IL2080;IL2101;IL2104;IL2110;IL2111;IL3002;IL3050;IL3053;SYSLIB0026;SYSLIB0027;SYSLIB0028;SYSLIB0057;SYSLIB0065</WarningsNotAsErrors>
<IlcTreatWarningsAsErrors>false</IlcTreatWarningsAsErrors>
Comment on lines +76 to 79
if (dashboardPath is null || !File.Exists(dashboardPath))
{
layoutLease?.Dispose();
throw new InvalidOperationException(DashboardCommandStrings.ManagedBinaryNotFound);
Comment on lines +96 to 99
var dashboardPath = layout.GetDashboardPath();
if (dashboardPath is null || !File.Exists(dashboardPath))
{
return CommandResult.Failure(CliExitCodes.DashboardFailure, DashboardCommandStrings.ManagedBinaryNotFound);
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants