Skip to content

Add Aspire integration tests that build after scaffolding and enable them - #3806

Open
haileymck wants to merge 18 commits into
mainfrom
dev/hmckelvie/aspire-build-tests
Open

haileymck wants to merge 18 commits into
mainfrom
dev/hmckelvie/aspire-build-tests

Conversation

@haileymck

Copy link
Copy Markdown
Member

Summary

Adds end-to-end Aspire integration tests that scaffold caching, database, and storage integrations and then build the resulting project, verifying the scaffolded output actually compiles. Also enables the previously-skipped Aspire integration tests across net8.0/net9.0/net10.0/net11.0.

All 125 Aspire integration tests pass across all four TFMs (Caching 28, Database 28, Storage 69).

What changed

Tests

  • AspireCachingIntegrationTestsBase.cs, AspireDatabaseIntegrationTestsBase.cs, AspireStorageIntegrationTestsBase.cs: replaced placeholder templates with buildable AppHost + worker projects, added *_ScaffoldsAndBuilds E2E facts that scaffold the integration and then run a real build, and removed the Skip attributes so the suite runs.
  • Helpers/ScaffoldCliHelper.cs: added Aspire template/project helpers; WriteAspireNuGetConfig now lets net8 Aspire fall through to the machine/repo dnceng feeds (like net9/10/11). Aspire packages are unpinned (IsVersionRequired=false) and need a live latest-version lookup, which nuget.org-only config can't serve; dnceng dotnet-public mirrors nuget.org and is CI-valid.

Product fixes uncovered by the tests

  • dotnet-scaffold.csproj: corrected Aspire code-mod config layout so the config files are located at runtime.
  • AspireCodeModificationHelper.cs: fixed Aspire config-path resolution.
  • IScaffoldRunner.cs / ScaffoldRunner.cs / Program.cs: propagate the scaffold exit code (RunAsync now returns Task<int>) so failures surface as a non-zero CLI exit code.

Related issues

Umbrella:

Per-integration / per-TFM:

Testing

  • Caching: 28/28 pass (net8/9/10/11)
  • Database: 28/28 pass (net8/9/10/11)
  • Storage: 69/69 pass (net8/9/10/11)

haileymck and others added 17 commits August 19, 2026 15:58
…them

Adds end-to-end Aspire integration tests that scaffold caching, database, and
storage integrations and then build the resulting project, and enables the
previously skipped Aspire integration tests across net8/9/10/11.

Also fixes three underlying product bugs uncovered by the tests:
- Aspire code-mod config layout in dotnet-scaffold.csproj
- Aspire config-path resolution in AspireCodeModificationHelper
- CLI exit-code propagation (IScaffoldRunner.RunAsync now returns Task<int>)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…819.3 (#3807)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26418.5 -> To Version 11.0.0-beta.26419.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…820.6 (#3808)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26419.3 -> To Version 11.0.0-beta.26420.6

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…811.19 (#3810)

On relative base path root
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore , Microsoft.AspNetCore.Identity.EntityFrameworkCore , Microsoft.AspNetCore.Identity.UI , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.Identity.Stores , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Options.ConfigurationExtensions , System.Text.Json From Version 11.0.0-rc.1.26409.102 -> To Version 11.0.0-rc.1.26411.119
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26420.6 -> To Version 11.0.0-beta.26411.119

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…829.11 (#3812)

On relative base path root
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore , Microsoft.AspNetCore.Identity.EntityFrameworkCore , Microsoft.AspNetCore.Identity.UI , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.Identity.Stores , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Options.ConfigurationExtensions , System.Text.Json From Version 11.0.0-rc.1.26411.119 -> To Version 11.0.0-rc.2.26429.111
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26411.119 -> To Version 11.0.0-beta.26429.111

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…905.10 (#3815)

On relative base path root
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore , Microsoft.AspNetCore.Identity.EntityFrameworkCore , Microsoft.AspNetCore.Identity.UI , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.Identity.Stores , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Options.ConfigurationExtensions , System.Text.Json From Version 11.0.0-rc.2.26429.111 -> To Version 11.0.0-rc.2.26455.110
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26429.111 -> To Version 11.0.0-beta.26455.110

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…909.9 (#3822)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26455.110 -> To Version 11.0.0-beta.26459.9

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…910.5 (#3824)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26459.9 -> To Version 11.0.0-beta.26460.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…911.5 (#3826)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26460.5 -> To Version 11.0.0-beta.26461.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…914.1 (#3829)

On relative base path root
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26461.5 -> To Version 11.0.0-beta.26464.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…ve rendering (#3830)

* Support persistent state in Blazor edit scaffolding

* Update dependencies from https://github.com/dotnet/dotnet build 20260829.11 (#3812)

On relative base path root
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore , Microsoft.AspNetCore.Identity.EntityFrameworkCore , Microsoft.AspNetCore.Identity.UI , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Embedded , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.Identity.Stores , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Options.ConfigurationExtensions , System.Text.Json From Version 11.0.0-rc.1.26411.119 -> To Version 11.0.0-rc.2.26429.111
Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26411.119 -> To Version 11.0.0-beta.26429.111

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* changes

* review-improvements

* test-improvements

* testcase/fix

* indentation-fix

* indentation-issue-fix

---------

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Allocate package lists only when needed

* Revert "Allocate package lists only when needed"

This reverts commit 9a8a446.

* Reapply "Allocate package lists only when needed"

This reverts commit ec596aa.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ensure the Aspire CI matrix runs caching, database, and storage families instead of matching only caching.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exclude ScaffoldIntegration tests from the standard build-stage test pass because the dedicated integration matrix runs them separately. This prevents Aspire package restores from exhausting hosted Linux agent disk space.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use a boolean MSBuild property so only dotnet-scaffold.Tests receives the correctly quoted xUnit trait exclusion across Windows, Linux, and macOS.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Re-run CI after isolated .NET 9 runtime assembly mismatches in API and RazorPages integration jobs; the same tests pass locally and on recent main PR runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use stable Aspire packages for net11 integration tests to avoid partially published prerelease dependency sets, and retry only the exact transient .NET runtime assembly activation failure seen in hosted integration jobs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment