Skip to content

Deprecate AddProject and complete Project V2 migration - #21360

Merged
Karol Zadora-Przylecki (karolz-ms) merged 16 commits into
mainfrom
dev/karolz/addproject-migration-plan
Oct 30, 2026
Merged

Karol Zadora-Przylecki (karolz-ms) merged 16 commits into
mainfrom
dev/karolz/addproject-migration-plan

Conversation

@karolz-ms

Copy link
Copy Markdown
Contributor

Description

Add SDK-style F# and VB support, stable project consumer helpers, and generalized EF APIs. Migrate ordinary first-party hosts, documentation, generated consumers, and extension fixtures while preserving intentional legacy integrations.

Share behavioral contracts across legacy and V2 project factories, including mixed project references and integration consumers.

Related issues:

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21360

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21360"

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 27, 2026
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 27, 2026 23:34
@github-actions

This comment has been minimized.

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.

🟢 Approval recommended

No active review issues are recorded for the migration from legacy AddProject usage to Project V2.

No open issues 🎉

What changed in this PR

Deprecates legacy AddProject usage and advances Project V2 adoption across first-party AppHosts, documentation, generated consumers, and test fixtures while retaining intentional legacy compatibility coverage.

Changes:

  • Migrates ordinary .NET registrations to AddDotnetProject and adds required integration references.
  • Stabilizes IDotnetProgramResource and extends coordinated builds to F# and Visual Basic projects.
  • Updates compatibility-test suppressions, test routing, and debugger prerequisites and localization.

This pull request is too complex or risky for automated approval. Validation was limited to source inspection and project-path checks; builds and tests were not run.

File Description
tools/​ReleaseNotes/​docs/​api-documentation.md Updates API examples and migration guidance.
tests/​testproject/​TestProject.AppHost/​TestProject.AppHost.csproj Adds the Dotnet integration reference.
tests/​TestingAppHost1/​TestingAppHost1.AppHost/​TestingAppHost1.AppHost.csproj Adds the Dotnet integration reference.
tests/​Shared/​TemplatesTesting/​data/​EndPointWriterHook_cs Collects endpoints from shared .NET program resources.
tests/​Infrastructure.Tests/​TestTriggerMap/​TestTriggerMapTests.cs Checks generated-consumer test routing.
tests/​Aspire.Playground.Tests/​Infrastructure/​ResourceExtensions.cs Generalizes project-name lookup to .NET programs.
tests/​Aspire.Hosting.Tests/​WithTerminalTests.cs Preserves legacy terminal coverage with warning suppression.
tests/​Aspire.Hosting.Tests/​WithIconNameTests.cs Preserves legacy icon compatibility coverage.
tests/​Aspire.Hosting.Tests/​Schema/​SchemaTests.cs Clarifies the compatibility-suppression rationale.
tests/​Aspire.Hosting.Tests/​ResourceExtensionsTests.cs Preserves legacy extension compatibility coverage.
tests/​Aspire.Hosting.Tests/​ResourceCommandServiceTests.cs Preserves legacy rebuild-command coverage.
tests/​Aspire.Hosting.Tests/​Publishing/​DotnetProgramArchiveTests.cs Preserves legacy archive-publishing coverage.
tests/​Aspire.Hosting.Tests/​ProjectResourceBuilderExtensionTests.cs Suppresses warnings for legacy builder-contract tests.
tests/​Aspire.Hosting.Tests/​Pipelines/​DistributedApplicationPipelineTests.cs Clarifies the compatibility-suppression rationale.
tests/​Aspire.Hosting.Tests/​Orchestrator/​ApplicationOrchestratorTests.cs Preserves synthetic legacy orchestration coverage.
tests/​Aspire.Hosting.Tests/​ManifestGenerationTests.cs Preserves legacy manifest coverage.
tests/​Aspire.Hosting.Tests/​KestrelConfigTests.cs Preserves synthetic legacy Kestrel coverage.
tests/​Aspire.Hosting.Tests/​ExternalServiceTests.cs Preserves legacy external-reference coverage.
tests/​Aspire.Hosting.Tests/​DistributedApplicationModelExtensionsTests.cs Preserves intentional legacy-only enumeration coverage.
tests/​Aspire.Hosting.Tests/​Dcp/​DcpExecutorTests.cs Preserves legacy launch and debugging coverage.
tests/​Aspire.Hosting.Tests/​Dashboard/​DashboardResourceTests.cs Preserves legacy dashboard metadata coverage.
tests/​Aspire.Hosting.Testing.Tests/​TestingFactoryTests.cs Expects V2 resources from the migrated fixture.
tests/​Aspire.Hosting.Testing.Tests/​Aspire.Hosting.Testing.Tests.csproj Adds the Dotnet integration reference.
tests/​Aspire.Hosting.Radius.Tests/​Publishing/​BicepGenerationSimpleTests.cs Preserves legacy Radius interoperability coverage.
tests/​Aspire.Hosting.Qdrant.Tests/​Aspire.Hosting.Qdrant.Tests.csproj Adds the Dotnet integration reference.
tests/​Aspire.Hosting.Milvus.Tests/​Aspire.Hosting.Milvus.Tests.csproj Adds the Dotnet integration reference.
tests/​Aspire.Hosting.Kubernetes.Tests/​KubernetesPublisherTests.cs Preserves legacy Kubernetes publishing coverage.
tests/​Aspire.Hosting.Kubernetes.Tests/​KubernetesEnvironmentResourceTests.cs Preserves legacy Kubernetes environment coverage.
tests/​Aspire.Hosting.Kubernetes.Tests/​KubernetesDeployTests.cs Preserves legacy Kubernetes deployment coverage.
tests/​Aspire.Hosting.Foundry.Tests/​HostedAgentExtensionTests.cs Preserves legacy hosted-agent interoperability coverage.
tests/​Aspire.Hosting.EntityFrameworkCore.Tests/​EFMigrationWaitForTests.cs Preserves legacy migration-wait coverage.
tests/​Aspire.Hosting.EntityFrameworkCore.Tests/​EFMigrationPipelineTests.cs Preserves legacy migration-publishing coverage.
tests/​Aspire.Hosting.EntityFrameworkCore.Tests/​EFMigrationCommandsTests.cs Preserves legacy migration-command coverage.
tests/​Aspire.Hosting.EntityFrameworkCore.Tests/​EFCoreOperationExecutorTests.cs Preserves legacy EF operation coverage.
tests/​Aspire.Hosting.EntityFrameworkCore.Tests/​EFBuildReadinessTests.cs Preserves legacy build-readiness coverage.
tests/​Aspire.Hosting.Dotnet.Tests/​DotnetProjectPublicApiTests.cs Supplies the resource name to metadata construction.
tests/​Aspire.Hosting.Docker.Tests/​DockerComposePublisherTests.cs Preserves legacy Compose publishing coverage.
tests/​Aspire.Hosting.DevTunnels.Tests/​Aspire.Hosting.DevTunnels.Tests.csproj Adds the Dotnet integration reference.
tests/​Aspire.Hosting.CodeGeneration.TypeScript.Tests/​Snapshots/​AtsTypeScriptCodeGeneratorTests.Generate_LegacyAddProject_RetainsDeprecatedBuilderMethod.verified.ts Records the deprecated TypeScript builder signature.
tests/​Aspire.Hosting.Blazor.Tests/​WithBlazorAppTests.cs Preserves legacy Blazor fluent contracts.
tests/​Aspire.Hosting.Blazor.Tests/​GatewayConfigurationBuilderTests.cs Preserves synthetic legacy gateway coverage.
tests/​Aspire.Hosting.Azure.Tests/​RoleAssignmentTests.cs Preserves legacy role-assignment coverage.
tests/​Aspire.Hosting.Azure.Tests/​PublicApiTests/​AppContainersPublicApiTests.cs Preserves legacy overload-validation coverage.
tests/​Aspire.Hosting.Azure.Tests/​FoundryExtensionsTests.cs Preserves legacy Foundry interoperability coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureWebPubSubExtensionsTests.cs Preserves legacy Web PubSub coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureUserAssignedIdentityTests.cs Preserves legacy identity coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureSqlDeploymentScriptTests.cs Preserves legacy deployment-script coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureSandboxesTests.cs Preserves legacy sandbox coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureProvisioningResourceExtensionsTests.cs Preserves legacy provisioning-parameter coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureFrontDoorTests.cs Preserves legacy Front Door coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureDeployerTests.cs Preserves legacy Azure deployment coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureContainerRegistryTests.cs Preserves legacy registry-role coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureAppServiceTests.cs Preserves legacy App Service coverage.
tests/​Aspire.Hosting.Azure.Tests/​AzureApplicationInsightsExtensionsTests.cs Preserves legacy telemetry-reference coverage.
tests/​Aspire.Hosting.Azure.EntraId.Tests/​Aspire.Hosting.Azure.EntraId.Tests.csproj Adds the Dotnet integration reference.
tests/​Aspire.Deployment.EndToEnd.Tests/​README.md Explains retained legacy deployment scenarios.
tests/​Aspire.Deployment.EndToEnd.Tests/​FoundryHostedAgentDeploymentTests.cs Migrates the generated hosted-agent registration.
tests/​Aspire.Deployment.EndToEnd.Tests/​AzureEntraIdDeploymentTests.cs Migrates the generated identity consumer.
tests/​Aspire.Deployment.EndToEnd.Tests/​AcaStarterDeploymentTests.cs Suppresses warnings in the legacy scenario.
tests/​Aspire.Deployment.EndToEnd.Tests/​AcaExpressDeploymentTests.cs Migrates generated API and frontend registrations.
tests/​Aspire.Cli.EndToEnd.Tests/​DockerComposeDeployWithVolumeTests.cs Suppresses warnings in generated legacy scenarios.
src/​Components/​Aspire.StackExchange.Redis/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.StackExchange.Redis.OutputCaching/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.StackExchange.Redis.DistributedCaching/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Seq/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.RabbitMQ.Client/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Qdrant.Client/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Pomelo.EntityFrameworkCore.MySql/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Oracle.EntityFrameworkCore/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.OpenAI/​README.md Adds Dotnet setup and migrates the consumer.
src/​Components/​Aspire.Npgsql/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Npgsql.EntityFrameworkCore.PostgreSQL/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.NATS.Net/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.MySqlConnector/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.MongoDB.EntityFrameworkCore/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.MongoDB.Driver/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Milvus.Client/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.EntityFrameworkCore.SqlServer/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.EntityFrameworkCore.Cosmos/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.Data.SqlClient/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.Azure.StackExchangeRedis/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Microsoft.Azure.Cosmos/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Confluent.Kafka/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Azure.Storage.Queues/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.Storage.Blobs/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.Security.KeyVault/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.Search.Documents/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.Npgsql/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL/​README.md Migrates the AppHost example and prerequisites.
src/​Components/​Aspire.Azure.Messaging.WebPubSub/​README.md Adds hosting prerequisites and migrates the consumer.
src/​Components/​Aspire.Azure.Messaging.ServiceBus/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.Data.Tables/​README.md Migrates the consumer and types conditional connection resources.
src/​Components/​Aspire.Azure.AI.Projects/​README.md Migrates the .NET consumer while retaining Foundry APIs.
src/​Aspire.Hosting/​ApplicationModel/​IDotnetProgramResource.cs Stabilizes the shared interface and clarifies its contract.
src/​Aspire.Hosting.Valkey/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.SqlServer/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Seq/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Rust/​README.md Migrates the .NET frontend example.
src/​Aspire.Hosting.Redis/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.RabbitMQ/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Qdrant/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.PostgreSQL/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Orleans/​README.md Migrates silo and frontend examples.
src/​Aspire.Hosting.Oracle/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.OpenAI/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Nats/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.MySql/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Milvus/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Keycloak/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Kafka/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Java/​README.md Migrates the .NET frontend example.
src/​Aspire.Hosting.Garnet/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Dotnet/​DotnetProjectBuildCoordinator.cs Recognizes supported F# and Visual Basic project files.
src/​Aspire.Hosting.Docker/​README.md Migrates the project-volume example and prerequisites.
src/​Aspire.Hosting.Azure.Sql/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.SignalR/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.ServiceBus/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.Search/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.Sandboxes/​README.md Migrates the sandbox workload example.
src/​Aspire.Hosting.Azure.Redis/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.PostgreSQL/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.OperationalInsights/​README.md Migrates the workspace consumer example.
src/​Aspire.Hosting.Azure.Kusto/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.Kubernetes/​README.md Migrates the AKS workload example.
src/​Aspire.Hosting.Azure.KeyVault/​README.md Migrates both .NET consumer examples.
src/​Aspire.Hosting.Azure.Functions/​README.md Documents the retained specialized Functions factory.
src/​Aspire.Hosting.Azure.FrontDoor/​README.md Migrates the API-origin example.
src/​Aspire.Hosting.Azure.EventHubs/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.CosmosDB/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.ConnectorNamespace/​README.md Migrates the worker consumer example.
src/​Aspire.Hosting.Azure.CognitiveServices/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.ApplicationInsights/​README.md Migrates the .NET consumer and installation instructions.
src/​Aspire.Hosting.Azure.AppConfiguration/​README.md Migrates the .NET consumer and installation instructions.
playground/​yarp/​Yarp.AppHost/​Yarp.AppHost.csproj Adds the Dotnet integration reference.
playground/​withdockerfile/​WithDockerfile.AppHost/​WithDockerfile.AppHost.csproj Adds the Dotnet integration reference.
playground/​withdockerfile/​WithDockerfile.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​webpubsub/​WebPubSub.AppHost/​WebPubSub.AppHost.csproj Adds the Dotnet integration reference.
playground/​webpubsub/​WebPubSub.AppHost/​AppHost.cs Migrates the frontend while retaining its launch profile.
playground/​waitfor/​WaitForSandbox.AppHost/​WaitForSandbox.AppHost.csproj Adds the Dotnet integration reference.
playground/​TestShop/​TestShop.AppHost/​TestShop.AppHost.csproj Adds the Dotnet integration reference.
playground/​Terminals/​Terminals.AppHost/​Terminals.AppHost.csproj Adds the Dotnet integration reference.
playground/​Stress/​Stress.AppHost/​Stress.AppHost.csproj Adds the Dotnet integration reference.
playground/​SqlServerScript/​AppHost1/​AppHost1.csproj Adds the Dotnet integration reference.
playground/​SqlServerScript/​AppHost1/​AppHost.cs Migrates both API registrations.
playground/​SqlServerEndToEnd/​SqlServerEndToEnd.AppHost/​SqlServerEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​signalr/​SignalR.AppHost/​SignalR.AppHost.csproj Adds the Dotnet integration reference.
playground/​signalr/​SignalR.AppHost/​AppHost.cs Migrates both frontend registrations.
playground/​seq/​Seq.AppHost/​Seq.AppHost.csproj Adds the Dotnet integration reference.
playground/​seq/​Seq.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​Redis/​Redis.AppHost/​Redis.AppHost.csproj Adds the Dotnet integration reference.
playground/​Redis/​Redis.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​Qdrant/​Qdrant.AppHost/​Qdrant.AppHost.csproj Adds the Dotnet integration reference.
playground/​Qdrant/​Qdrant.AppHost/​AppHost.cs Migrates the API registration.
playground/​python/​Python.AppHost/​Python.AppHost.csproj Adds the Dotnet integration reference.
playground/​python/​Python.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​publishers/​Publishers.AppHost/​Publishers.AppHost.csproj Adds the Dotnet integration reference.
playground/​ProxylessEndToEnd/​ProxylessEndToEnd.AppHost/​ProxylessEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​PostgresEndToEnd/​PostgresEndToEnd.AppHost/​PostgresEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​PostgresEndToEnd/​PostgresEndToEnd.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​pipelines/​Pipelines.Library/​Pipelines.Library.csproj Adds the Dotnet integration reference.
playground/​pipelines/​Pipelines.AppHost/​Pipelines.AppHost.csproj Adds the Dotnet integration reference.
playground/​pipelines/​Pipelines.AppHost/​AppHost.cs Migrates service and dashboard registrations.
playground/​ParameterEndToEnd/​ParameterEndToEnd.AppHost/​ParameterEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​ParameterEndToEnd/​ParameterEndToEnd.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​orleans/​Orleans.AppHost/​Orleans.AppHost.csproj Adds the Dotnet integration reference.
playground/​OracleEndToEnd/​OracleEndToEnd.AppHost/​OracleEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​OracleEndToEnd/​OracleEndToEnd.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​OpenAIEndToEnd/​OpenAIEndToEnd.AppHost/​OpenAIEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​nats/​Nats.AppHost/​Nats.AppHost.csproj Adds the Dotnet integration reference.
playground/​nats/​Nats.AppHost/​AppHost.cs Migrates API and backend registrations.
playground/​mysql/​MySqlDb.AppHost/​MySqlDb.AppHost.csproj Adds the Dotnet integration reference.
playground/​mysql/​MySqlDb.AppHost/​AppHost.cs Migrates the API registration.
playground/​mongo/​Mongo.AppHost/​Mongo.AppHost.csproj Adds the Dotnet integration reference.
playground/​mongo/​Mongo.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​milvus/​MilvusPlayground.AppHost/​MilvusPlayground.AppHost.csproj Adds the Dotnet integration reference.
playground/​milvus/​MilvusPlayground.AppHost/​AppHost.cs Migrates the API registration.
playground/​keycloak/​Keycloak.AppHost/​Keycloak.AppHost.csproj Adds the Dotnet integration reference.
playground/​keycloak/​Keycloak.AppHost/​AppHost.cs Migrates API and frontend registrations.
playground/​kafka/​KafkaBasic.AppHost/​KafkaBasic.AppHost.csproj Adds the Dotnet integration reference.
playground/​JavaSwing/​JavaSwing.AppHost/​JavaSwing.AppHost.csproj Adds the Dotnet integration reference.
playground/​JavaSwing/​JavaSwing.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​JavaSpringBoot/​JavaSpringBoot.AppHost/​JavaSpringBoot.AppHost.csproj Adds the Dotnet integration reference.
playground/​JavaSpringBoot/​JavaSpringBoot.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​JavaQuarkus/​JavaQuarkus.AppHost/​JavaQuarkus.AppHost.csproj Adds the Dotnet integration reference.
playground/​JavaQuarkus/​JavaQuarkus.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​HealthChecks/​HealthChecksSandbox.AppHost/​HealthChecksSandbox.AppHost.csproj Adds the Dotnet integration reference.
playground/​HealthChecks/​HealthChecksSandbox.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​FoundryEndToEnd/​FoundryEndToEnd.AppHost/​FoundryEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​FoundryEndToEnd/​FoundryEndToEnd.AppHost/​AppHost.cs Migrates application and dashboard registrations.
playground/​FoundryAgents/​FoundryAgents.AppHost/​FoundryAgents.AppHost.csproj Adds the Dotnet integration reference.
playground/​FileBasedApps/​Directory.Build.targets Adds Dotnet integration to file-based AppHosts.
playground/​FileBasedApps/​apphost.cs Migrates the dashboard registration.
playground/​ExternalServices/​ExternalServices.AppHost/​ExternalServices.AppHost.csproj Adds the Dotnet integration reference.
playground/​ExternalServices/​ExternalServices.AppHost/​AppHost.cs Migrates frontend and dashboard registrations.
playground/​EntraId/​EntraId.AppHost/​EntraId.AppHost.csproj Adds the Dotnet integration reference.
playground/​EntraId/​EntraId.AppHost/​AppHost.cs Migrates frontend and dashboard registrations.
playground/​DotnetTool/​DotnetTool.AppHost/​DotnetTool.AppHost.csproj Adds the Dotnet integration reference.
playground/​DotnetTool/​DotnetTool.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​DevTunnels/​DevTunnels.AppHost/​DevTunnels.AppHost.csproj Adds the Dotnet integration reference.
playground/​deployers/​Deployers.AppHost/​Deployers.AppHost.csproj Adds the Dotnet integration reference.
playground/​DatabaseMigration/​DatabaseMigration.AppHost/​DatabaseMigration.AppHost.csproj Adds the Dotnet integration reference.
playground/​CustomResources/​CustomResources.AppHost/​CustomResources.AppHost.csproj Adds the Dotnet integration reference.
playground/​CustomResources/​CustomResources.AppHost/​AppHost.cs Migrates the dashboard registration.
playground/​CosmosEndToEnd/​CosmosEndToEnd.AppHost/​CosmosEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​CertManagerDemo/​CertManagerDemo.AppHost/​CertManagerDemo.AppHost.csproj Adds the Dotnet integration reference.
playground/​CertManagerDemo/​CertManagerDemo.AppHost/​AppHost.cs Migrates the API registration.
playground/​cdk/​CdkSample.AppHost/​CdkSample.AppHost.csproj Adds the Dotnet integration reference.
playground/​cdk/​CdkSample.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​BrowserTelemetry/​BrowserTelemetry.AppHost/​BrowserTelemetry.AppHost.csproj Adds the Dotnet integration reference.
playground/​BrowserTelemetry/​BrowserTelemetry.AppHost/​AppHost.cs Migrates web and dashboard registrations.
playground/​BlazorStandalone/​BlazorStandalone.AppHost/​BlazorStandalone.AppHost.csproj Adds the Dotnet integration reference.
playground/​BlazorHosted/​BlazorHosted.AppHost/​BlazorHosted.AppHost.csproj Adds the Dotnet integration reference.
playground/​BlazorHosted/​BlazorHosted.AppHost/​AppHost.cs Migrates APIs and the Blazor server.
playground/​bicep/​BicepSample.AppHost/​BicepSample.AppHost.csproj Adds the Dotnet integration reference.
playground/​bicep/​BicepSample.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​AzureVirtualNetworkEndToEnd/​AzureVirtualNetworkEndToEnd.AppHost/​AzureVirtualNetworkEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureVirtualNetworkEndToEnd/​AzureVirtualNetworkEndToEnd.AppHost/​AppHost.cs Migrates the API registration.
playground/​AzureStorageEndToEnd/​AzureStorageEndToEnd.AppHost/​AzureStorageEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureServiceBus/​ServiceBus.AppHost/​ServiceBus.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureServiceBus/​ServiceBus.AppHost/​AppHost.cs Migrates the worker registration.
playground/​AzureSearchEndToEnd/​AzureSearch.AppHost/​AzureSearch.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureSearchEndToEnd/​AzureSearch.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​AzureOpenAIEndToEnd/​AzureOpenAIEndToEnd.AppHost/​AzureOpenAIEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureKusto/​AzureKusto.AppHost/​AzureKusto.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureKusto/​AzureKusto.AppHost/​AppHost.cs Migrates worker and dashboard registrations.
playground/​AzureFunctionsEndToEnd/​AzureFunctionsEndToEnd.AppHost/​AppHost.cs Suppresses warnings for the retained legacy scenario.
playground/​AzureDataLakeEndToEnd/​AzureDataLakeEndToEnd.AppHost/​AzureDataLakeEndToEnd.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureDataLakeEndToEnd/​AzureDataLakeEndToEnd.AppHost/​AppHost.cs Migrates the API registration.
playground/​AzureContainerApps/​AzureContainerApps.AppHost/​AzureContainerApps.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureContainerApps/​AzureContainerApps.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​AzureAppService/​AzureAppService.AppHost/​AzureAppService.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureAppService/​AzureAppService.AppHost/​AppHost.cs Migrates API and dashboard registrations.
playground/​AzureAppConfiguration/​AzureAppConfiguration.AppHost/​AzureAppConfiguration.AppHost.csproj Adds the Dotnet integration reference.
playground/​AzureAppConfiguration/​AzureAppConfiguration.AppHost/​AppHost.cs Migrates the web registration.
playground/​AspireWithNode/​AspireWithNode.AppHost/​AspireWithNode.AppHost.csproj Adds the Dotnet integration reference.
playground/​AspireWithMaui/​AspireWithMaui.AppHost/​AppHost.cs Preserves the legacy MAUI companion scenario.
playground/​AspireWithJavaScript/​AspireJavaScript.AppHost/​AspireJavaScript.AppHost.csproj Adds the Dotnet integration reference.
playground/​AspireWithJavaScript/​AspireJavaScript.AppHost/​AppHost.cs Migrates the weather API registration.
playground/​AspireEventHub/​EventHubs.AppHost/​EventHubs.AppHost.csproj Adds the Dotnet integration reference.
playground/​AspireEventHub/​EventHubs.AppHost/​AppHost.cs Migrates consumer and API registrations.
playground/​AksDemo/​AksDemo.AppHost/​AppHost.cs Migrates the API registration.
playground/​AksDemo/​AksDemo.AppHost/​AksDemo.AppHost.csproj Adds the Dotnet integration reference.
extension/​src/​test/​strings.test.ts Checks the language-neutral debugger label.
extension/​src/​loc/​strings.ts Adds the localized .NET debugger display helper.
extension/​package.nls.json Adds the debugger localization entry.
extension/​loc/​xlf/​aspire-vscode.xlf Includes the new translation source.
eng/​github-ci/​test-trigger-map.yml Routes Dotnet changes to end-to-end consumers.
docs/​specs/​with-terminal.md Migrates the terminal example and documents prerequisites.
.github/​workflows/​extension-e2e-tests.yml Installs debugger prerequisites for coordinated-build shards.

Review effort: Balanced

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the production, test, extension and docs changes. 3 issues found: 1 behavior/diagnostics (project-path errors), 1 F#/VB product behavior (icon), 1 documentation (obsolete API docs).

@github-actions

This comment has been minimized.

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.

🔵 Needs a closer look

The migration changes build and launch ownership across several application and deployment paths, while end-to-end runtime and debugger validation is unavailable in this review environment.

No open issues 🎉

Review effort: Balanced

@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.

@karolz-ms

Copy link
Copy Markdown
Contributor Author

PR Testing Report

PR Information

  • PR: microsoft/aspire#21360
  • Title: Deprecate AddProject and complete Project V2 migration
  • Head commit: 4dc878ce7ab22e75a64054f34fa1cde41f4c875e
  • GitHub merge commit tested by CI: 2823963bc3cabee09092936d105e53eb73324335
  • Merge parents: af8141dfc920bac59ab288c63da10772efae49f1 + 4dc878ce7ab22e75a64054f34fa1cde41f4c875e
  • Tested at: 2026-10-28T11:34:42.7341627-07:00
  • Execution target: Local Windows temp directories, with Microsoft NuGet/npm package-feed proxies

Artifact Version Verification

  • Expected PR head: 4dc878ce7ab22e75a64054f34fa1cde41f4c875e
  • Installed dogfood CLI: 17.0.0-pr.21360.g4dc878ce
  • Status: ✅ Verified

The CLI and PR NuGet hive came from GitHub Actions run 40739616194.

Changes Analyzed

The PR changes 384 files.

Change Categories

  • .NET hosting changes: AddProject deprecation, AddDotnetProject, project path resolution, F#/VB support, stable V2 helpers
  • Entity Framework changes: generalized IDotnetProgramResource migration APIs
  • VS Code extension changes: F#/VB project debugging, launch profile handling, real coreclr launch proof
  • CI infrastructure changes: extension E2E debugger prerequisites and test-trigger routing
  • Tests and snapshots
  • Documentation and first-party sample migration

Representative Files

  • src/Aspire.Hosting.Dotnet/DotnetProjectHostingExtensions.cs
  • src/Aspire.Hosting.Dotnet/DotnetProjectMetadata.cs
  • src/Shared/ProjectPathResolver.cs
  • src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs
  • src/Aspire.Hosting.EntityFrameworkCore/EFMigrationResource.cs
  • src/Aspire.Hosting.EntityFrameworkCore/EFResourceBuilderExtensions.cs
  • extension/src/debugger/languages/dotnet.ts
  • extension/src/debugger/launchProfiles.ts
  • extension/src/testing/dotnetResourceLaunchProof.ts
  • extension/src/test-e2e/coordinatedBuild.e2e.test.ts
  • .github/workflows/extension-e2e-tests.yml
  • eng/github-ci/test-trigger-map.yml

Test Scenarios Executed

Scenario 1: Dogfood CLI and package artifact identity

Objective: Verify the tested artifact contains the latest PR changes.

Coverage type: Artifact verification

Status: ✅ Passed

Result: The installed CLI reported 17.0.0-pr.21360.g4dc878ce, matching the latest head commit.

Evidence: dogfood-version.txt

Scenario 2: Focused .NET hosting contracts

Objective: Exercise the new path, launch-profile, consumer, facade, customization, and compatibility tests at the exact PR head.

Coverage type: Source tests

Status: ✅ Passed

Command:

dotnet test --project tests\Aspire.Hosting.Dotnet.Tests\Aspire.Hosting.Dotnet.Tests.csproj --no-launch-profile -- `
  --filter-class "*.DotnetProjectPathTests" `
  --filter-class "*.DotnetProjectLaunchProfileTests" `
  --filter-class "*.DotnetProjectConsumerTests" `
  --filter-class "*.DotnetProjectFacadeTests" `
  --filter-class "*.ProjectCustomizationCompatibilityTests" `
  --filter-class "*.ProjectReferenceCompatibilityTests" `
  --filter-not-trait "quarantined=true" `
  --filter-not-trait "outerloop=true"

Result: 100 passed, 0 failed.

Evidence: hosting-dotnet-focused-tests.log

Scenario 3: Generalized EF migration contracts

Objective: Verify the generalized EF API and public EFMigrationResource behavior.

Coverage type: Source tests

Status: ✅ Passed

Command:

dotnet test --project tests\Aspire.Hosting.EntityFrameworkCore.Tests\Aspire.Hosting.EntityFrameworkCore.Tests.csproj --no-launch-profile -- `
  --filter-class "*.AddEFMigrationsTests" `
  --filter-class "*.EFMigrationConfigurationTests" `
  --filter-class "*.EFMigrationResourceTests" `
  --filter-not-trait "quarantined=true" `
  --filter-not-trait "outerloop=true"

Result: 57 passed, 0 failed.

Evidence: ef-focused-tests.log

Scenario 4: C#, F#, and Visual Basic resources in a real AppHost

Objective: Verify the dogfood packages run SDK-style C#, F#, and VB projects through AddDotnetProject, directory shorthand, coordinated build, and language-specific launch profile discovery.

Coverage type: Happy path / runtime

Status: ✅ Passed

Steps:

  1. Created a fresh aspire-empty app from the PR hive.
  2. Added independent C#, F#, and VB console projects.
  3. Added each project by directory with AddDotnetProject.
  4. Used the new stable helper APIs on the C# builder:
    • WithReplicas
    • DisableForwardedHeaders
    • WithEndpointsInEnvironment
    • GetProjectMetadata
  5. Started the AppHost with the dogfood CLI.
  6. Waited for all three resources to reach up.
  7. Captured resource state and console output.

Observed output:

  • C#: READY|C#|properties-csharp|--csharp-profile
  • F#: READY|F#|properties-fsharp|--fsharp-profile
  • VB: READY|VB|my-project-vb|--vb-my-project

The VB result proves My Project/launchSettings.json took precedence over Properties/launchSettings.json.

The dashboard visually showed all three resources running with distinct C#, F#, and VB icons.

Evidence:

  • hosting-start.log
  • hosting-describe.json
  • csharp-service-logs.json
  • fsharp-service-logs.json
  • visual-basic-service-logs.json

Scenario 5: Ambiguous multi-language project directory

Objective: Verify a directory containing multiple supported project files is rejected rather than selecting an arbitrary project.

Coverage type: Unhappy path

Status: ✅ Passed

Input: One directory containing both .fsproj and .vbproj.

Expected outcome: Non-zero AppHost startup with a resource-specific actionable validation error.

Observed outcome: Startup failed with:

Path to .NET project for resource 'ambiguous-service' could not be determined. The directory ... must contain exactly one .csproj, .fsproj, or .vbproj file.

Evidence: negative-ambiguous.log

Scenario 6: Unsupported F# script

Objective: Verify .fsx remains unsupported and fails safely at the resource validation boundary.

Coverage type: Unhappy path

Status: ✅ Passed

Observed outcome:

  • AppHost started.
  • Resource entered FailedToStart.
  • aspire wait returned non-zero.
  • Resource logs contained the expected error naming the resource and valid extensions.

Evidence:

  • negative-unsupported-wait.log
  • negative-unsupported-describe.json
  • negative-unsupported-resource-logs.json

Scenario 7: Public package-consumer API compilation

Objective: Compile a fresh consumer against the PR NuGet hive using the newly stable V2 helpers, generalized EF APIs, builder covariance, public EFMigrationResource constructor, and legacy AddProject.

Coverage type: Package/API consumer

Status: ✅ Passed

Observed outcome:

  • The V2 helper and EF APIs compiled successfully.
  • IResourceBuilder<DotnetProjectResource> converted to IResourceBuilder<IDotnetProgramResource>.
  • Legacy AddProject remained source-compatible and emitted the expected CS0618 warning:

Use AddDotnetProject from the Aspire.Hosting.Dotnet package instead.

Evidence: api-contract-build.log

Scenario 8: VS Code extension build and focused unit validation

Objective: Verify the PR extension source compiles, lints, generates schemas/localization, and passes tests covering the changed extension surfaces.

Coverage type: Build / unit

Status: ✅ Passed with environment notes

Results:

  • extension\build.ps1: passed after isolating npm's prefix/cache to avoid a machine-level Scoop cache permission error.
  • npm/Yarn used https://packagefeedproxy.microsoft.io/npm/.
  • Schema generation, TypeScript compilation, webpack, lint, and CLI build passed.
  • Focused changed-file unit run: 508 passed.
  • One internal-feed timing test exceeded its default 20-second timeout during the grouped run; an isolated rerun passed in 1.2 seconds.
  • The latest PR CI extension unit job also passed: Windows extension unit tests.

The initial full local unit run also encountered Windows symlink-privilege tests outside the changed surface. Those are machine-policy failures; the corresponding PR CI unit job is green.

Evidence:

  • extension-build-retry.log
  • extension-focused-tests.log
  • extension-timeout-rerun.log

Scenario 9: Real Extension Host C#/F#/VB Run and Debug

Objective: Verify the changed extension drives the installed coreclr adapter for externally built C#, F#, and VB resources, preserving Release output, build environment, launch profiles, Run/Debug mode, and source breakpoints without rebuilding.

Coverage type: User-visible E2E

Status: ✅ Passed

Environment:

  • PR extension source and VSIX at commit 4dc878ce
  • Dogfood CLI 17.0.0-pr.21360.g4dc878ce
  • Pinned .NET Install Tool VSIX 3.1.0
  • Pinned C# VSIX 2.148.23 for win32-x64

Result: 6/6 tests passed locally:

  • C# Run and Debug
  • F# Run and Debug
  • VB Run and Debug
  • Coordinated Release output without rebuild
  • Custom run properties without project output/rebuild
  • File-app configuration selection

The same shard passed in real PR CI:

Both CI logs show the new debugger prerequisite setup installing the .NET runtime and C# VSIX packages before the tests.

Evidence:

  • extension-coordinated-build-e2e-final.log
  • extension-e2e-state.json
  • extension-e2e-mocha.json
  • ci-coordinated-build-windows.log
  • ci-coordinated-build-linux.log

Scenario 10: CI test-selection routing

Objective: Verify Aspire.Hosting.Dotnet changes reach the extension E2E job and the outerloop Aspire.EndToEnd.Tests consumer.

Coverage type: CI infrastructure

Status: ✅ Passed

Production selector result:

  • Triggered PR job: job:extension-e2e
  • Advisory-only test: Aspire.EndToEnd.Tests
  • Additional selected consumers included Aspire.Cli.EndToEnd.Tests, Aspire.Templates.Tests, and Aspire.Hosting.Dotnet.Tests.

The latest PR CI Infrastructure.Tests job passed 2,049 tests:

Evidence:

  • selector-trace.log
  • ci-infrastructure-tests.log

CI Infrastructure Validation

GitHub Actions

  • Affected workflow: .github/workflows/extension-e2e-tests.yml
  • Behavioral change: The coordinated-build matrix entries now request the .NET debugger prerequisites.
  • What ran on this PR: Both Windows and Linux coordinated-build shards ran automatically and passed 6/6 tests.
  • Observable verified: The job logs show installation of the pinned .NET runtime and C# VSIX files before real coreclr Run/Debug tests.
  • Automated infrastructure coverage: Infrastructure.Tests passed 2,049/2,049.
  • Selector trace: Aspire.Hosting.Dotnet selected job:extension-e2e and the advisory Aspire.EndToEnd.Tests.
  • Manual dispatch: Not needed; the affected reusable workflow and both changed matrix entries executed on the PR.
  • Coverage-loss audit: No PR trigger, required dependency, needs:, or continue-on-error gate was removed or narrowed.
  • gh-aw: Not applicable.

Azure DevOps

No Azure DevOps pipeline YAML or pipeline-executed plumbing changed. No AzDO run was required.

Issues Found

1. Merge-result builds fail because a new main-branch test still uses obsolete AddProject

Status: ❌ Blocking

The PR head does not contain tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorPrivateLinkTests.cs, but the GitHub merge ref does. That file arrived from the current main parent and contains 23 AddProject<Project> calls.

Once this PR's [Obsolete] attributes are applied in the merge result, CI treats all 23 CS0618 warnings as errors. This breaks four jobs before tests run:

This needs either migration to the appropriate V2 resource shape or an intentional, documented local suppression for scenarios that must remain legacy.

Evidence: missed-azure-addproject-calls.txt

2. TypeScript code-generation snapshot is stale

Status: ❌ Blocking

Both TypeScript code-generation jobs fail:

Local reproduction:

dotnet test --project tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests.csproj --no-launch-profile -- `
  --filter-method "*.TwoPassScanning_GeneratesWithEnvironmentOnTestRedisBuilder" `
  --filter-not-trait "quarantined=true" `
  --filter-not-trait "outerloop=true"

The test generated 27 expected documentation replacements in:

tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts

The snapshot needs to be reviewed and accepted.

Evidence: missing-typescript-snapshot.diff

Additional red CI checks

At report generation, the PR had 12 failed and 4 pending checks. Six failures are explained by the two blocking issues above. The other failures appear transient or environmental:

  • DevTunnels disposed-service-provider race: targeted local rerun passed.
  • RemoteHost registration timeout: targeted local rerun passed.
  • Hosting pipeline access-denied failure: targeted local rerun passed.
  • MongoDB replica-set startup failure: container/volume startup failure; not reproduced locally.
  • macOS CLI test module hang: not reproduced on Windows.
  • Windows diagnostic-logs E2E: Selenium ElementNotInteractableError while dismissing a notification.

These remaining checks should be rerun after fixing the deterministic blockers, then investigated only if they persist.

Summary

Scenario Status Notes
Dogfood artifact identity ✅ Passed Exact head SHA in version
Focused Hosting.Dotnet tests ✅ Passed 100/100
Focused EF tests ✅ Passed 57/57
C#/F#/VB runtime smoke ✅ Passed All running and healthy
VB launch profile precedence ✅ Passed My Project selected
Ambiguous directory validation ✅ Passed Actionable non-zero failure
Unsupported .fsx validation ✅ Passed FailedToStart with expected message
Package-consumer API compile ✅ Passed Stable V2/EF APIs compile; legacy warning emitted
Extension build and focused unit tests ✅ Passed Environment-only retries documented
Coordinated-build Extension Host E2E ✅ Passed 6/6 local, 6/6 Windows CI, 6/6 Linux CI
Test-selection routing ✅ Passed Extension E2E + EndToEnd consumer selected
GitHub merge-result compatibility ❌ Failed 23 unsuppressed obsolete calls from current main
TypeScript generated snapshot ❌ Failed 27 stale documentation replacements

Overall Result

❌ ISSUES FOUND

The new runtime and extension behaviors work in direct testing, including real C#/F#/VB Run and Debug. The PR is not merge-ready because the GitHub merge result has deterministic warnings-as-errors failures and a stale TypeScript snapshot.

Recommendations

  1. Resolve the 23 obsolete AddProject call sites in AzureFrontDoorPrivateLinkTests.cs against the current main branch.
  2. Review and accept the TypeScript code-generation snapshot update.
  3. Push the fixes and rerun CI.
  4. Reassess the six remaining red checks only if they persist after the deterministic failures are fixed.

Evidence Artifacts

Evidence is stored in the session artifact folder pr-21360-testing/.

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the production, test, extension and docs changes at 4dc878c (CI merge commit 2823963). 5 issues found: 2 CI/build (build break against current main; stale TypeScript SDK snapshot), 1 documentation (README drift from main), 1 test coverage (real F#/VB through the AppHost pipeline), 1 stale comment.

The remaining red CI jobs (DevTunnels, MongoDB, RemoteHost, a Windows pipeline-state test, the macOS Cli hang, an extension E2E UI flake) look transient and unrelated to this diff.

@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

This comment has been minimized.

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.

🟢 Approval recommended

No active review issues remain for the Project Resource V2 migration.

No open issues 🎉

Review effort: Balanced

@karolz-ms

Copy link
Copy Markdown
Contributor Author

PR Testing Report

PR Information

Artifact Version Verification

  • Expected Commit: 8828125a2b4e5af9d6169e1c81ec9c95237b9e97
  • Installed Version: 17.0.0-pr.21360.g8828125a
  • Installed CLI: PR win-x64 dogfood artifact from run 40764679822
  • Status: ✅ Verified

The PR head was checked again after testing and remained unchanged.

Changes Analyzed

The PR changes 436 files:

  • Hosting and API: AddProject obsoletion, stable AddDotnetProject consumer helpers, SDK-style C#/F#/VB project paths, coordinated builds, mixed legacy/V2 references, generalized EF migration APIs.
  • VS Code extension: C#/F#/VB launch-profile handling, external-build debug configuration, real Run/Debug proof, and coordinated-build E2E debugger provisioning.
  • CI: Aspire.Hosting.Dotnet now routes to Aspire.EndToEnd.Tests; coordinated-build E2E rows install the pinned .NET runtime and C# debugger VSIXes.
  • Consumers: first-party playgrounds, tests, generated consumers, docs, and integration examples migrate to AddDotnetProject where appropriate.

Change Categories

  • Direct Aspire CLI implementation changes
  • Hosting changes
  • Dashboard changes
  • Template implementation changes
  • Client/component implementation changes
  • VS Code extension changes
  • Test changes
  • CI infrastructure changes

Test Scenarios Executed

Scenario 1: PR artifact identity

Objective: Ensure runtime testing uses the artifact built from the current PR head.

Coverage Type: Artifact verification
Status: ✅ Passed

The PowerShell dogfood installer downloaded cli-native-archives-win-x64, built-nugets, and built-nugets-for-win-x64. The installed binary reported:

17.0.0-pr.21360.g8828125a

Scenario 2: C#, F#, and VB hosting smoke test

Objective: Verify AddDotnetProject recognizes, builds, and launches SDK-style C#, F#, and Visual Basic projects with language-specific launch-profile discovery.

Coverage Type: Happy path
Status: ✅ Passed

A fresh file-based AppHost was created from the PR hive. It registered:

builder.AddDotnetProject("csharp", "./Services/CSharpService/CSharpService.csproj");
builder.AddDotnetProject("fsharp", "./Services/FSharpService/FSharpService.fsproj");
builder.AddDotnetProject("vb", "./Services/VbService/VbService.vbproj");

Commands used:

aspire start --apphost <apphost.cs> --isolated --format Json --non-interactive --nologo
aspire wait csharp --status up --timeout 180 --apphost <apphost.cs>
aspire wait fsharp --status up --timeout 180 --apphost <apphost.cs>
aspire wait vb --status up --timeout 180 --apphost <apphost.cs>
aspire describe --apphost <apphost.cs> --format Json
aspire logs <resource> --tail 20 --apphost <apphost.cs> --format Json

All three resources reached Running and Healthy. Each resource reported:

  • project.launchProfile = primary
  • resource.launchConfigurationType = project-with-external-build.v1
  • expected profile arguments and environment

Observed resource output:

READY|C#|csharp-profile|--from-profile,CSharp
READY|F#|fsharp-profile|--from-profile,FSharp
READY|VB|vb-profile|--from-profile,Vb

The VB resource used My Project/launchSettings.json; C# and F# used Properties/launchSettings.json.

Scenario 3: Invalid .NET project paths

Objective: Verify new multi-language path support fails safely and gives actionable diagnostics.

Coverage Type: Unhappy path
Status: ✅ Passed

Ambiguous directory: A directory containing both .csproj and .fsproj files was rejected before launch:

The directory ... must contain exactly one .csproj, .fsproj, or .vbproj file.
Specify an explicit project filename when multiple supported projects exist.

Unsupported F# script: An existing .fsx file reached FailedToStart with:

The path must be to a .cs file, an SDK-style .csproj, .fsproj, or .vbproj file,
or a directory containing exactly one supported project.

Scenario 4: Hosting and EF source validation

Objective: Exercise the PR's new and modified behavioral contracts at the exact source commit.

Coverage Type: Focused unit/integration validation
Status: ✅ Passed

Results:

Test selection Result
SDK project consumer/facade/launch-profile/path/customization/reference classes 100/100 passed
Mixed-language shared coordinated build 8/8 passed
Publish environment, debug annotation, and replica behavior 10/10 passed
Generalized EF migration APIs 15/15 passed
AddProject obsoletion and modern consumer compile contracts 6/6 passed
Test-trigger-map routing 2/2 passed

Representative commands:

dotnet test --project tests\Aspire.Hosting.Dotnet.Tests\Aspire.Hosting.Dotnet.Tests.csproj --no-launch-profile -- --filter-class "*.DotnetProjectConsumerTests" --filter-class "*.DotnetProjectFacadeTests" --filter-class "*.DotnetProjectLaunchProfileTests" --filter-class "*.DotnetProjectPathTests" --filter-class "*.ProjectCustomizationCompatibilityTests" --filter-class "*.ProjectReferenceCompatibilityTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

dotnet test --project tests\Aspire.Hosting.Dotnet.Tests\Aspire.Hosting.Dotnet.Tests.csproj --no-launch-profile -- --filter-method "*.SharedProjectGraphBuildsOnceBeforeServicesRun" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

dotnet test --project tests\Aspire.Hosting.EntityFrameworkCore.Tests\Aspire.Hosting.EntityFrameworkCore.Tests.csproj --no-launch-profile -- --filter-method "*.AllConfigurationOptionsCanBeChained" --filter-method "*.WithMigrationsProjectForPolyglotAcceptsProjectResource" --filter-method "*.SharedIdentityAndMigrationConsumerApisAreStable" --filter-method "*.GeneralizedConstructorCapturesDataWithoutRegisteringResource" --filter-method "*.GeneralizedConstructorRejectsNullStartupProject" --filter-method "*.GeneralizedFactoryOverloadsRegisterMigration" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

An initial mixed-build run failed because the temporary SDK was connected through a Windows directory junction; MSBuild task hosts resolved the system runtime instead of the PR SDK. Materializing the SDK under the checkout fixed the environment, and the exact test then passed 8/8.

Scenario 5: VS Code extension build and focused unit tests

Objective: Verify the PR extension source compiles, localizes, lints, builds with the PR CLI, and passes the changed test surface.

Coverage Type: Build/unit validation
Status: ✅ Passed with an environment caveat

Commands:

$env:NPM_REGISTRY = "https://packagefeedproxy.microsoft.io/npm/"
.\extension\build.ps1

corepack yarn unit-test `
  --run out/test/aspireEditorCommandProvider.test.js `
  --run out/test/dotnetDebugger.test.js `
  --run out/test/dotnetResourceLaunchProof.test.js `
  --run out/test/e2eLaunchProfile.test.js `
  --run out/test/e2eShardMatrix.test.js `
  --run out/test/launchProfiles.test.js `
  --run out/test/parsers.test.js `
  --run out/test/strings.test.js
  • Extension and Aspire CLI build: passed.
  • Changed extension tests: 511/511 passed.
  • The full local extension command completed compile and lint, then reported 3718 passing, 55 pending, 7 failing. All seven failures were pre-existing E2E download-cache tests that require Windows symlink privileges (EPERM: operation not permitted, symlink). The PR's Windows extension unit CI job passed.

Scenario 6: Real Extension Host coordinated-build E2E

Objective: Verify real Run and Debug behavior with externally built Release outputs for C#, F#, and VB, including launch profiles and breakpoints.

Coverage Type: User-visible E2E
Status: ✅ Passed

The PR's changed workflow installed the pinned C# debugger and .NET runtime VSIXes on both runners. The job logs confirm the VSIX was installed before the tests.

Platform Result Job
Windows 6/6 passed https://github.com/microsoft/aspire/actions/runs/40764679822/job/123096550759
Linux 6/6 passed https://github.com/microsoft/aspire/actions/runs/40764679822/job/123096550463

Both platforms passed:

  • Run and Debug externally built Release C# resources.
  • Run and Debug externally built Release F# resources.
  • Run and Debug externally built Release VB resources.
  • Preserve coordinated build environment and output without rebuilding.
  • Honor custom run properties without requiring project output.
  • Use the requested file-app configuration.

The Linux diagnostics include an E2E recording.

CI Infrastructure Validation

GitHub Actions

  • What runs on this PR: ci.yml selected extension E2E, Hosting, CLI, generated AppHost consumers, and the normal unit-test matrix. The coordinated-build E2E ran on Linux and Windows.
  • Automated tests: The two focused TestTriggerMapTests passed.
  • Selection evidence: The live select-tests-selection.json includes Aspire.EndToEnd.Tests, Aspire.Hosting.Dotnet.Tests, job:extension-e2e, and job:cli-starter-validation.
  • YAML validation: .github/workflows/extension-e2e-tests.yml and eng/github-ci/test-trigger-map.yml parsed successfully.
  • Matrix coverage: The E2E matrix stayed at 44 rows, with two coordinated-build rows before and after the change. No shard was removed.
  • Results validation: Both coordinated-build logs show the C# debugger VSIX installed successfully and the new C#/F#/VB tests executing, not merely a green job conclusion.
  • Manual triggers: None required; the affected reusable workflow ran through the PR's CI caller.
  • Dependency graph: extension-e2e-tests.yml ran through tests.yml; the changed test-trigger map selected the generated AppHost consumers.
  • gh-aw: Not applicable.
  • Failure-mode scan: No trigger, permission, token, action-pin, artifact-name, or artifact-layout changes. Linux and Windows portability were validated in real jobs.
  • Coverage-loss audit: Not applicable; no PR trigger, needs:, or continue-on-error gate was removed or narrowed.

Azure DevOps

Not applicable; this PR does not change eng/pipelines/** or eng/common/**.

Other CI Failures

At the final check, the PR had 435 passing, 3 failing, 2 pending, and 2 skipped checks. The three failures do not appear attributable to this PR:

  1. DevTunnels Ubuntu: DevTunnelMonitorTests.UnrecognizedOutputWarnsOnceAndReconcilesReadiness hit an ObjectDisposedException. The failing production/test path is unchanged by the PR (the production change is documentation only), and the exact test passed locally.
  2. MongoDB Ubuntu: VerifyMongoDBMultiNodeReplicaWithDataShouldWorkAcrossUsages(MembersReordered) failed to become healthy. The PR changes only an XML documentation example in MongoDBBuilderExtensions.cs; this failure is already tracked by [CI Failure] Flaky: MongoDbReplicaSetFunctionalTests.VerifyMongoDBMultiNodeReplicaWithDataShouldWorkAcrossUsages fails to become healthy #20478.
  3. CLI macOS: The test host was terminated after the 10-minute hang timeout with zero failed tests and three unrelated tests still running. The PR has no direct CLI implementation or CLI test changes. Those eight filtered cases passed locally.

These jobs should be rerun before merge so the PR returns to a green state.

Summary

Scenario Status Notes
PR artifact identity ✅ Passed Exact head/version match
C#/F#/VB dogfood runtime ✅ Passed Running, healthy, correct profile args/env
Invalid path handling ✅ Passed Actionable ambiguous and unsupported-path errors
Hosting and EF focused tests ✅ Passed 141 focused cases
Extension build and focused tests ✅ Passed 511 changed-surface tests
Extension coordinated-build E2E ✅ Passed 6/6 Windows and 6/6 Linux
CI routing/workflow behavior ✅ Passed Live selection and job-log evidence
Overall CI ⚠️ Not green Three apparently unrelated failures; two checks still pending

Overall Result

✅ TESTED FEATURE VERIFIED — ⚠️ PR CI NOT GREEN

No PR-attributable product, extension, or CI-routing regression was found. Rerun the three failed jobs before merge; investigate further only if DevTunnels or CLI macOS reproduces.

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.

🔵 Needs a closer look

The cross-cutting AddProject migration requires human API-review sign-off and coordinated-build debugger and Azure deployment E2E verification that source inspection cannot provide.

No open issues 🎉

Review effort: Max

@github-actions

This comment has been minimized.

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.

🔵 Needs a closer look

The broad AddProject deprecation and build/launch ownership migration need maintainer/API sign-off and runtime validation beyond the partial, static-only review available.

No open issues 🎉

Review effort: Max

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looked through the V2 migration, legacy API compatibility, and the extension's launch/debug handling, including the follow-up fixes. I don't have any additional blocking comments. Looks good to me.

@radical

Copy link
Copy Markdown
Member

[automated] PR review map: mostly migration and test churn; prioritize the API contract, debugger behavior, and preservation of existing tests.

Snapshot: e237767ab6311804d5f640b98a95f57f07eb32c6 · 448 files · ➕7,399 / ➖2,205. Counts are measured; load and attention are estimates. Moves have not been verified or discounted. CI observations below were collected on October 30, 2026; this is a snapshot, not a live status report or correctness sign-off.

Review map

Follow the numbered order; each link opens a starting file.

Load = expected reading/verification effort. Attention = importance of human judgment, regardless of diff size.

Order / start here Files · ➕ / ➖ Load Attention Specific review question
1. API transition 7 · +192 / −57 Medium 🔴 Prioritize Are deprecation, stable helpers, and new build-output metadata contracts appropriate?
2. Hosting ↔ debugger 9 · +140 / −30 High 🔴 Prioritize Does attachment use the actual built output and correct application PID, including custom output paths?
3. Shared-test restructuring 9 · +1,535 / −1,168 Medium–High 🔴 Verify preservation Do existing assertions remain discoverable and run for both legacy and V2 factories?
4. Language/path/profiles 3 · +90 / −15 Medium 🟡 Focused Are F#/VB resolution, profile precedence, and validation boundaries consistent?
5. Other tests, fixtures, harness 75 · +3,696 / −396 Mixed 🟡 Focused Do tests exercise real execution, reject fallbacks, and preserve fixture behavior?
6. CI/routing 2 · +3 / −1 Low 🟡 High leverage Are debugger prerequisites installed, and are runtime dependencies routed to the correct lane?
7. Playground migrations 135 · +257 / −153 Low–Medium 🟡 Exceptions; 🟢 repetition Are paths, typed helpers, model queries, and service-build responsibilities preserved?
8. Documentation/guidance 158 · +1,251 / −379 Medium guide; low sweep 🟡 Guide; 🟢 repetition Does the migration guide explain behavior differences and retained exceptions accurately?
9. Warning-only tests 50 · +235 / −6 Low 🟢 Sample Are obsolete-warning suppressions confined to intentional legacy coverage?

Each file belongs to one row by primary purpose; mixed-purpose files can affect other groups.

Tests inspected versus CI observed

  • Inspected: compiler-diagnostic tests, path/profile matrices, shared legacy/V2 contracts, and real debugger E2E scenarios. These support the intended behavior—but do not prove completeness.
  • Observed on this head: Windows/Linux .NET integration jobs, extension Windows unit tests, and Infrastructure tests passed in the test run. Individual test execution/skips were not audited.
  • Not established: latest-head debugger E2E success, all tool-gated/container scenarios, or outerloop execution. Green tests also cannot prove that deleted assertions were preserved.

🚨 Call-outs

  • API review remains unchecked, and watch support is not implemented; Functions/MAUI and other intentional legacy cases remain.
  • Migration is not a rename: resource types and build responsibilities differ; legacy C# explicit-null profile selection needs deliberate translation.
  • At collection time, CI was not fully green: the Native AOT/generated SDK/Docker/DCP/CLI/Dashboard check failed. Its cause has not been investigated here.

@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.

Normalize the audited project-path examples, playground AppHosts, test inputs, and newly added MSBuild ProjectReference values to forward slashes. Regenerate only the coupled Go and TypeScript documentation snapshots.

Co-authored-by: Copilot App <[email protected]>
The resource process and debug session are already stopped, but Roslyn can still be completing project discovery on Windows. Use the existing bounded E2E removal helper for that transient handle and prove the same fixture path can be recreated and removed.

Co-authored-by: Copilot App <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

Selects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'tests/Shared/TemplatesTesting/data/EndPointWriterHook_cs' selects ALL


Selection computed for commit e0fd059.

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.

🔵 Needs a closer look

The cross-cutting public API, coordinated-build, debugger, and deployment changes require human API review and runtime validation unavailable in this static-review environment.

No open issues 🎉

Review effort: Max

@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.

@karolz-ms
Karol Zadora-Przylecki (karolz-ms) merged commit 13b2068 into main Oct 30, 2026
880 of 887 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 30, 2026
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 3, 2026
… projects (#21505)

## Description

A TypeScript (or any guest-language) AppHost builds and runs .NET
project resources with `--configuration Release` during `aspire
run`/`aspire start`, even though a plain `dotnet run` of the same
project uses Debug.

### Root cause

Guest AppHosts call `Aspire.Hosting/createBuilder`, which goes through
`DistributedApplication.CreateBuilder(CreateBuilderOptions)`. That path
never sets an AppHost assembly, so `DistributedApplicationOptions` falls
back to `Assembly.GetEntryAssembly()`. In a guest AppHost, the entry
assembly is the **prebuilt AppHost server**, which ships as Release. Its
`[AssemblyConfiguration("Release")]` was then used as the "AppHost build
configuration" by:

- `WithProjectDefaults` (`AddProject`, exported to TS as `addProject`):
`launchDefaults.BuildConfiguration` → `dotnet run --configuration
Release` and the IDE launch configuration.
- `AddDotnetProject`: the coordinated build and launch configuration.
- MAUI platform resources: the build info.
- `ExecutableLaunchRecipe`, through
`DistributedApplicationOptions.Configuration`.

### Fix

- `CreateBuilder(CreateBuilderOptions)` marks the options as a guest
AppHost (`IsGuestAppHost`). The polyglot `createBuilder` dispatcher
routes all of its forms (omitted options, `string[]`,
`CreateBuilderOptions`) through this path. The public C# `CreateBuilder`
overloads are unchanged. For guest AppHosts,
`DistributedApplicationOptions.Configuration` resolves to `null`. The
server assembly is still used for its other metadata (DCP paths, etc.).
- The builder publishes the resolved value as
`AppHost:BuildConfiguration`, next to the existing `AppHost:*` facts.
`AddProject`, `AddDotnetProject` and MAUI now read this single source,
so every consumer agrees, including across assemblies without
InternalsVisibleTo.
- With no configuration, no `--configuration` is passed, so `dotnet
build`/`dotnet run` use the SDK default (Debug), matching a direct
`dotnet run`.
- C# AppHosts are unchanged: the key holds the AppHost assembly's
configuration as before.
`BuilderPublishesAppHostAssemblyBuildConfiguration` covers this.

Out of scope: `EFCoreOperationExecutor` derives its configuration, TFM
and paths from the entry assembly as a group. This change doesn't touch
it.

### Reproduction and evidence

The regression tests build a builder through the polyglot entry point
(`DistributedApplication.CreateBuilder(new CreateBuilderOptions { ...
})`) and add a project. Each test first asserts that the test host's
entry assembly has a non-empty `AssemblyConfiguration`, so it is a
meaningful stand-in for the prebuilt server.

**Before (main 13b2068):** with the `src/` fix reverted and the tests
kept:
```
failed DistributedApplicationBuilderTests.PolyglotBuilderDoesNotApplyAppHostServerBuildConfigurationToProjects
  Expected: null
  Actual:   "Debug"
failed DistributedApplicationBuilderTests.BuilderPublishesAppHostAssemblyBuildConfiguration
  Expected: "Debug"
  Actual:   null
failed DotnetProjectResourceTests.AddDotnetProject_GuestAppHostDoesNotApplyAppHostServerBuildConfiguration
  Expected: null
  Actual:   "Debug"
```
`PolyglotCreateBuilderDoesNotApplyAppHostServerBuildConfiguration`
covers each dispatcher form. Without the dispatcher change, `omitted`
and `args` fail with `Actual: "Debug"`.

The test host is built as Debug, so it leaks "Debug" here. In the
product, the shipped server is Release, so the leaked value is
"Release".

**After:** all of these tests pass. The `AddDotnetProject` test asserts
both the launch configuration and
`DotnetProjectMetadata.BuildConfiguration`, which feeds the coordinated
build and process launch.

Related suites, run locally on Linux at this head:
- `Aspire.Hosting.Tests`: `DistributedApplicationBuilderTests`,
`ProjectResourceTests` and `WithProjectDefaultsTests` passed, 125/125.
- `Aspire.Hosting.Dotnet.Tests`: `DotnetProjectResourceTests` and
`DotnetProjectBuildCoordinatorTests` passed, 186/186.
- `Aspire.Cli.EndToEnd.Tests`: builds and discovers the new E2E test
locally. In CI it passed (see above).

**End-to-end coverage:** no existing Cli.EndToEnd test checked which
configuration a TypeScript AppHost's .NET project runs with. This PR
adds
`TypeScriptDotnetProjectBuildConfigurationTests.DotnetProjectFromTypeScriptAppHostDoesNotUseAppHostServerBuildConfiguration`,
which runs in the Docker E2E image against this PR's CLI and packages.
It:

1. Runs `aspire init --language typescript` and `aspire add
Aspire.Hosting.Dotnet`.
2. Creates a project with `dotnet new web`, adds it with
`addDotnetProject('api', './Api/Api.csproj')` and runs `aspire start`.
3. Waits for `api` to be up.

It then asserts:

- The `project.configuration` property from `aspire describe api`, which
is parsed from the real `dotnet` launch arguments, is not `Release`.
- `Api/bin/Release` doesn't exist.
- `Api/bin/Debug` exists.

On main, `DotnetProjectMetadata.BuildConfiguration` is the server's
`Release`. That adds `--configuration Release` to both the coordinated
`dotnet build` and `dotnet run`, which writes `bin/Release` and reports
`project.configuration=Release`, so this test would fail there. The test
is discovered locally (`--list-tests`). It needs Docker and a CLI
bundle, so it runs in CI.

**E2E pass-after (CI, head `8a9c2d2e`):** run
[41159489960](https://github.com/microsoft/aspire/actions/runs/41159489960),
job [`Cli.EndToEnd-TypeScriptDotnetProjectBuildConfigurationTests
(ubuntu-latest)`](https://github.com/microsoft/aspire/actions/runs/41159489960/job/124416735383)
reports `total: 1, failed: 0, skipped: 0`, and the TRX outcome is
`Passed` (1m10s). The terminal recording shows:
```
project.configuration=''
BUILD_CONFIGURATION_OK
```
So the TypeScript AppHost launched the project with no `--configuration`
argument (SDK default Debug), `Api/bin/Debug` exists and
`Api/bin/Release` doesn't.

Note: the branch was rebased onto main after #21360 deprecated
`AddProject`. The TypeScript `addProject` export still calls the
now-obsolete `AddProject`, so the regression test suppresses CS0618
around that one call.

Fixes #16444

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

---------

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 5, 2026
…lation and process exit) (#21397)

## Description

> **Update after merging `main` (2026-10-30):** #21360 has since landed
on `main` with its own fix that gives this test a separate `stopCts` for
`StopAsync` and moves it to `LongTimeoutTimeSpan` budgets. The
cancellation-ownership repair this PR originally made is therefore
already on `main`. After resolving the merge conflict, this PR adds
**regression coverage only** on top of `main`'s version of the test:
>
> - The test becomes a `[Theory]` that also covers an explicitly
cancelled startup token after startup has completed
(`cancelStartupAfterStart: true`).
> - The test awaits its actual `StartAsync` task instead of discarding
it.
> - It asserts that the ServiceB root process is running before shutdown
and has exited afterwards, and that `ApplicationStopped` fires.
>
> The timeouts and token ownership come unchanged from `main`. The
before/after evidence below was gathered against the original pre-#21360
base. It shows why phase-owned shutdown is needed, but it is no longer
this PR's diff. Both theory cases pass locally on the merged head.

Original description (pre-merge): give
`BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation`
separate startup and shutdown cancellation budgets. A slow startup
previously consumed most of the same 30-second CI token subsequently
passed to `StopAsync`, causing cleanup cancellation even when shutdown
itself completed within the standard bound.

Related: #21026, #21328. These issues are intentionally left open for
continued observation.

The test now observes its actual startup task, creates the shutdown
token only when entering shutdown, and runs both natural and explicitly
cancelled completed-startup cases. All existing resource/event
assertions, waits, ports, and timeout values are preserved. Both cases
verify actual host shutdown and ServiceB root-process exit. No product,
shared fixture, workflow, dependency, or policy changes are included.

### Native before/after evidence

| Run | Actual selected execution evidence |
|---|---|
| [Unmodified
baseline](https://github.com/microsoft/aspire/actions/runs/40903532956)
| 8 passed / 1 failed. Failure was cancellation in the original line-365
`StopAsync` after approximately 21 seconds of startup consumed the
shared 30-second budget. |
| [Paired causal
experiment](https://github.com/microsoft/aspire/actions/runs/40908555842)
| Shared-token/cancelled-completed-startup controls failed 9/9;
phase-owned shutdown with the same startup cancellation passed 9/9, with
actual shutdown/root exit within the unchanged bound. Diagnostic
controls and instrumentation are not in this PR. |
| [Clean repair
qualification](https://github.com/microsoft/aspire/actions/runs/40913395606)
| **60 actual TRX executions passed, 0 failed, 0 skipped** on Windows
runners 2 and 3, each completing all three fixed iterations. Includes
both repaired rows six times each, 12 adjacent event cases, and 36
broader lifecycle/cancellation/explicit-start cases. |

The clean repaired source at `d28c36fe8091ae1308fbf5691e36b71c3b51b0e2`
is byte-identical to the test source executed at validation head
`7c6ad6b7d8d99b06eea1224f853ea45f4ad5f822`. Only the separate validation
branch contains workflow selection/TRX-capture configuration.

**Qualification gap:** 90 executions were planned. Runner 1's build
succeeded, but its check reports “The hosted runner lost communication
with the server.” It retained neither logs nor TRX; its 30 planned
outcomes are unknown, not passes or demonstrated test failures. That
qualification workflow remains failed; subsequent normal PR CI does not
fill those missing outcomes. Local native execution was unavailable
after the prescribed restore failed with NU1900/NU1905 resolving
configured NuGet audit metadata; the supported hosted Windows path was
used without policy overrides.

### Normal PR CI status (2026-10-29 18:28 UTC)

[Normal
CI](https://github.com/microsoft/aspire/actions/runs/40922625873)
executed both repaired theory rows and both adjacent event facts
successfully on Windows and Ubuntu. Hosting-1 completed **28 passed / 0
failed / 0 skipped** on Windows and **63 passed / 0 failed / 0 skipped**
on Ubuntu.

Attempt 1 failed in the unchanged Ubuntu
`AzureFunctionsTests.AddAzureFunctionsProject_WorksWithMultipleProjects`
at its line-201 parameterless `host.StopAsync()`
(`TaskCanceledException`, 32.300-second test; suite 2,109 passed / 1
failed / 5 skipped). That separate test does not use this PR's repaired
method or startup token; its root cause remains unproven.

The repository's automatic CI rerun started attempt 2 without a source
change. Its Azure suite passed **2,110 / 0 failed / 5 skipped**,
including that method in 28.566 seconds. The macOS ARM64 build also
succeeded. Latest applicable CI is now green on
`d28c36fe8091ae1308fbf5691e36b71c3b51b0e2` (46 successful checks, 29
skipped); skipped checks are not passing test executions. The first
Azure failure and the separate qualification gap above remain part of
the evidence. Copilot review identified no active issues. This is ready
for human review, not approved for merge.

### Scope and limits

This is not a revival of #20406's broad
shared-fixture/shutdown-timeout/DCP-log-forwarding changes. That PR was
closed after an out-of-order DCP API-server update bug was identified.
Here the actual selected host path separately demonstrates that passing
an already-cancelled completed-startup token to shutdown causes
cancellation; giving shutdown its own unchanged budget completes host
shutdown and root exit.

The distinct original line-353 resource-startup failure associated with
Docker/WSLc discovery stalls is **not fixed or claimed fixed**.
Root-process exit does not prove that every descendant process exited.

Created using the repository's [fix-flaky-test
skill](https://github.com/microsoft/aspire/blob/main/.agents/skills/fix-flaky-test/SKILL.md),
with existing before/after native evidence and deterministic
cancellation coverage rather than arbitrary delays or larger timeouts.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] 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
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants