David Negstad
90d · built 2026-11-30
Performance
What David Negstad shipped in the selected window, measured in ETV, and how it compares with the 90 days before it.
Effective capacity
+16.8engineers
delivers like 17.8 (17.8x pre-AI)
Output (ETV)
53.4ETV
+132.8% vs 22.9 prior
Features share
26.6%
−3.2 pp vs prior window
Fixes share
8.2%
+3.4 pp vs prior window
Work mix
26.6% Features5.3% Maintenance57.4% Tests2.5% Docs8.2% Fixes
35 commits over 90 days, ending 2026-11-30.
Where this dev ranks
Percentile against the global top-100 leaderboard (all-time totals).
- By commits
- Top 98 %
- By Features share
- Top 60 %
Daily performance
Daily ETV, stacked by Features, Maintenance, Tests, Docs and Fixes.
Repository spread
Where this developer's commits land. Concentrated work (top1 > 80%) vs polymath spread (top1 < 30%).
Most impactful commits
Top 10 by ETV in the last 90 days.
- 16.6ETVStandardize NuGet restore and channel-update policy across AppHosts (#19763) ## Description Polyglot integration restore, package/template discovery, and C# channel updates currently compose NuGet policy in different ways. This can make the packages offered by discovery disagree with what can be restored, change configuration behavior when an integration project reference is added, or leave persisted AppHost configuration inconsistent with an update. This PR shares NuGet configuration composition across those paths. Aspire-selected sources and mappings are applied alongside NuGet's native configuration hierarchy, reusing existing source aliases and inheriting their authentication and transport settings. Package and project integrations resolve together, discovery checks source eligibility, and explicit C# channel updates preview configuration changes before restoring and persisting them. ### Polyglot integration restore - Package-only AppHosts restore all integration packages through the CLI's in-process NuGet client without requiring the .NET SDK. - AppHosts with project references use one generated `IntegrationRestore.csproj` containing the direct integration packages and projects. NuGet resolves their shared dependency graph and reports incompatible requirements during restore. - The generated root targets the current host runtime identifier. Referenced projects retain their own target and restore behavior. Package assets remain in NuGet package folders; project-built output is copied into a content-addressed snapshot. Configuration discovery is anchored at the AppHost rather than the generated cache directory. Both restore implementations use the same selected SDK, channel, source override, and evaluated NuGet settings. Overlays express the selected source/mapping policy; operations requiring a separate package cache use one instead of the ordinary global-packages folder. Referenced projects continue to discover configuration from their own directories. Opt-in MSBuild properties provide hosting-version and credential-free source hints without automatically replacing the projects' restore configuration. ### Integration and template discovery Bundled and SDK-driven discovery check effective package-source mappings before offering ordinary search or exact-version results. Bundled discovery filters before cross-source deduplication so an ineligible feed's higher version cannot hide an eligible result. An explicit `--source` restricts discovery and template installation to that source while retaining an existing selected alias's NuGet settings. Dependency restore has a different scope: after polyglot `aspire add` selects a package, its package ID is mapped to the explicit source, but other eligible sources remain available for dependencies. The selected integration feed is not assumed to contain every dependency. ### C# AppHost updates Unqualified updates preserve the current native NuGet policy rather than selecting replacement feeds from CLI or Aspire channel metadata. Explicit channel updates compose a configuration candidate and show it through the existing NuGet preview and approval flow. Project/package edits are staged, the updated graph is restored through native MSBuild, and configuration and metadata changes are persisted only after restore succeeds. Handled failures roll back owned file edits. An unresolved AppHost SDK can be repaired before strict restore-policy validation, without allowing unknown or overridden policy to be persisted. Fallback project parsing also normalizes MSBuild project-reference separators across platforms. When an existing mapping policy is Aspire-only, the candidate can add `*` mappings for enabled, previously unmapped ambient feeds so unrelated dependencies remain eligible. These mapping changes appear in the same approval; inherited feed URLs and credentials are not copied into the local file. Unrelated mapping restrictions are retained. Explicit stable selection returns to existing ambient feeds without adding NuGet.org; an explicitly supplied service-index override remains a separate source selection. ### Known trade-offs - `aspire add` does not persist per-integration channel or source provenance. A package selected from another channel or an explicit source can restore for that invocation but require a project-wide channel change or user-owned NuGet configuration for a later cold restore. - The project-reference path always runs implicit restore before building the generated integration project. It favors correctness over warm-build performance; package-only restores retain their reusable cache. - Package-only restores do not fully support NuGet fallback package folders from configuration or `NUGET_FALLBACK_PACKAGES`. Manifest asset resolution across those folders remains tracked by #20631. ### NuGet configuration and diagnostics NuGet remains responsible for evaluating configuration and handling authentication and trust settings. Overlays reuse existing source aliases and leave those settings in their original hierarchy rather than copying them into generated configuration. Credential-bearing explicit `--source` values are rejected. For configured sources containing inline credentials, diagnostic handling suppresses raw invocation logging and applies best-effort redaction using known URL spellings and credential components. This is not a general-purpose credential scrubber. Generated NuGet artifacts are not scrubbed and can still contain configured source URLs; credential providers and credential sections remain preferred over inline URL credentials. Related: #20631 tracks the remaining fallback-package-folder limitation. ## 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 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d38799a7-a99c-48c5-b45b-9d6594dd1830github.com-microsoft-aspire · fff2b56e · 2026-10-15
- 6.4ETVMatch AppHosts across equivalent filesystem paths (#19762) * Normalize AppHost filesystem paths Canonicalize explicit AppHost paths to the filesystem path before invoking MSBuild or matching running AppHost sockets. This keeps macOS /var and /private/var path identities consistent across run, wait, describe, and stop. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use symlink resolution for AppHost paths Rely on the existing segment-walking path resolver for Unix filesystem path canonicalization instead of hardcoding macOS firmlink prefixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Handle AppHost path aliases consistently Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd71101-249d-428b-81e7-9b247b9b3a2a * Normalize project locator path assertions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd71101-249d-428b-81e7-9b247b9b3a2a * Address AppHost path review feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Preserve selected AppHost path display Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Normalize remaining AppHost path comparisons Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Fix macOS CLI path assertions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Preserve symlinked AppHost execution paths Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Keep selected AppHost in candidate results Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Consolidate AppHost socket ownership into AppHostSocketManager Auxiliary backchannel socket handling was spread across BackchannelConstants, AppHostHelper, the CLI resolver, and the AppHost service, so every consumer had to know the filename format, the hash variants, the directory layout, and the PID liveness rules. Fold that into a shared AppHostSocketManager exposing two primitives -- create a socket for an AppHost, and find an AppHost's sockets -- and return IAppHostSocket handles that own connect and delete. Identifiers, hashes, path-normalization variants, and directory layout are now implementation details. AppHostSocketListener owns the socket file's lifetime: an AppHost never recreates a socket file it already bound, so a file left behind on shutdown is rediscovered by every later CLI invocation. Also back off unreachable sockets in AuxiliaryBackchannelMonitor. A socket whose PID is alive but that refuses connections cannot be deleted, because deleting a live AppHost's socket makes it undiscoverable for the rest of its lifetime. Previously such a socket was pushed back onto the "new sockets" list on every scan, so every scan paid the full 3s connect retry budget -- indefinitely, and MCP tools scan frequently. It is now parked with exponential backoff instead. The monitor also now resolves the home directory through CliExecutionContext rather than reading the user profile directly, matching AppHostConnectionResolver and keeping test runs out of the developer's real socket directory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Document why AppHost socket keys are caller-derived GetSocketKeyPaths searches three spellings without explaining why, and the fact that all three derive from the caller's spelling is load-bearing: it is why a socket produced under a different casing on a case-insensitive filesystem is not found, and why there is deliberately no fallback that connects to every running AppHost to compare reported paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Guard the launcher PID match against CLI PID reuse, and lock socket retry cleanup The detached launch path matched a backchannel connection by launcher PID alone. An AppHost outlives the CLI that started it and keeps reporting that CLI's PID, so once the OS recycles the PID onto our freshly spawned child, an unrelated orphan matched first and the launcher reported its dashboard URLs and waited on its readiness. Require the AppHost's CliStableStartedAt to match the child as well, using the /proc-derived clock domain that survives wall-clock adjustment, and fall back to the PID-only match for AppHosts from older CLIs that never stamped it. Also reacquire _scanLock around the failed-socket cleanup. _knownSocketPaths is a plain HashSet and a concurrent scan clears and repopulates it inside the lock, so mutating it unsynchronized here could corrupt the set rather than just lose an entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Claim due socket retries so concurrent scans cannot fan out connect loops Retry candidates were selected under _scanLock, but the connect attempts are awaited after the lock is released and the backoff is only escalated once the retry budget is exhausted. That left a window as wide as the whole retry budget in which an overlapping scan re-selected the same socket and started its own connect loop, so a single stale socket could still fan out concurrent retries and undo the bounded cost the backoff was added to provide. MCP tools scan often enough to overlap in practice. Claim the retry when it is selected by deferring it again, carrying the delay forward unchanged so MarkUnreachable keeps doubling from the same point. New sockets need no equivalent claim because _knownSocketPaths is repopulated before the lock is released. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Stop rescanning every socket when stopping a resolved AppHost StopRunningAppHostsForResolvedFileAsync scanned all sockets itself, but the non-interactive path had already scanned them immediately before calling it. That paid every unreachable socket's connect retry budget twice. Take the connections the caller already has, and scan only on the interactive path, which resolves a single connection and genuinely needs the full set to stop sibling instances. Also drop the displayNotRunningMessage parameter, which both callers set to true, and document when the no-match branch can actually be reached. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Don't let a detached launch adopt a stale AppHost at the same path The launcher's path fallback matched any connection whose self-reported AppHost path canonicalized to the one being launched. Before this PR the same match was keyed on socket hashes derived exactly like StopExistingInstancesAsync derives its kill set, so anything the launcher could adopt had already been stopped. Canonicalizing the connection's path widened that set past what stop can find, since stop is still limited to socket keys spelled the way the caller spelled the path. A pre-upgrade instance keyed under a different spelling now survives the stop and is already listening while the AppHost we just spawned is still starting, so it wins the match: wrong dashboard reported, new AppHost left running. Narrow the fallback with two facts rather than a heuristic. An AppHost naming a different launching CLI was definitively not launched by our child, and an AppHost our child launched cannot predate our child -- StableStartedAt is in the same stable PID-identity domain as the child's start time, so that ordering comparison is exact. AppHosts reporting neither field keep the bare path match. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Address code review findings on backchannel socket handling Production fixes: - AuxiliaryBackchannelService now completes _listeningTcs on every exit path, so a bind or path-length failure surfaces to waiters instead of making them block until their own timeout. The fault is observed in the finally so it cannot resurface as an UnobservedTaskException. - AuxiliaryBackchannelMonitor applies exponential backoff to handshake failures instead of only to refused connections. Previously a socket whose handshake threw was forgotten and paid the full connect plus handshake cost on every scan, forever. Cancellation is now caught separately so a cancelled scan does not penalize the socket. - CreateFileProviders disposes anything it already created if a later provider throws. - Selection hoists the canonicalization of the explicitly selected path out of the per-candidate predicate. - AppHostSocketManager.CreateSocketHandles drops a redundant second ProcessExists call and documents the PID-reuse asymmetry that makes the single check safe. Test fixes: - The two new monitor concurrency tests were skipping 100% of the time on macOS because the temp socket path was 111 bytes against a 104-byte limit. They now build paths under a budgeted short temp directory and actually run. - Those tests gate on a logged EventId rather than log message text, and fail with the captured log instead of hanging when the expected connect attempts never arrive. - TestAuxiliaryBackchannelMonitor delegates to the production selection and scope policies instead of carrying copies, so selection tests are no longer asserting on the fake. The copy of the scope check had already drifted from production. - Added launcher coverage that an AppHost located through a directory symlink is adopted, which fails if either side of the path comparison stops canonicalizing. - Split the persisted-path casing test so a skipped filesystem case is visible in the run report rather than silently taking a branch. - TestAppHostSocket derives ProcessId from its socket path like production, and a hosting test no longer risks orphaning a bound socket in the real home directory on assertion failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 * Point stale test comments at the current socket lookup entry point Two test comments still named AppHostHelper.FindMatchingNonOrphanedSockets, which this PR removes in favor of AppHostSocketManager.FindSockets. Naming the current entry point keeps the explanations verifiable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd71101-249d-428b-81e7-9b247b9b3a2a Copilot-Session: fcc8d4ae-d038-4760-95b6-4f36a9bacb71github.com-microsoft-aspire · 737af0fe · 2026-09-02
- 6.1ETVAdd browser-facing origin references for CORS and redirect configuration (#21260) ## Description Browser-facing URLs such as `*.dev.localhost`, customized public URLs, and Codespaces forwarding URLs can differ from physical endpoint addresses. Expose those origins as deferred endpoint references so CORS and authentication configuration can agree with the address the browser uses, without changing host/container service discovery. ```csharp var endpoint = frontend.GetEndpoint("https"); backend.WithEnvironment("FRONTEND_ORIGIN", endpoint.PrimaryBrowserOrigin); backend.WithEnvironment("ALLOWED_ORIGINS", endpoint.BrowserOrigins); entraWeb.WithRedirectUris(endpoint, "/signin-oidc"); ``` - `PrimaryBrowserOrigin` resolves to one preferred HTTP(S) origin. - `BrowserOrigins` resolves to a comma-separated list of distinct HTTP(S) origins. In run mode, both use finalized endpoint URLs after customization and Codespaces projection, in URL display preference order. Origins exclude credentials, paths, queries, and fragments. The physical allocated HTTP(S) origin is retained after customized origins, even when its dashboard link is removed. The primary origin is the first entry in that same sequence, falling back to the allocated origin when no customized origins remain. Without any HTTP(S) origins, both values are empty. Resolution is independent of the reference's service-discovery network context. Entra endpoint redirect helpers now consume `PrimaryBrowserOrigin` directly, removing the custom comma splitting from generated Bicep. Local resolution preserves the warned 30-second fallback to the allocated origin if URL finalization does not complete. Publish-mode resolution uses the compute environment's primary-browser-origin expression. The Node Entra playground uses the same scalar reference for its base URL; the playground launch-settings changes are included. Both properties are also exposed through the generated TypeScript, Go, Java, Python, and Rust SDKs. ### Publication Local display URLs are not deployment addresses. Publishers interpret both properties through their deployed endpoint mappings: - **Azure Container Apps and App Service:** use public deployed HTTP(S) origins; unsupported internal or non-HTTP(S) references are rejected. Container Apps Express applies its public-endpoint visibility checks to both properties. - **Docker Compose:** uses independently configurable deployment inputs, defaulting to localhost and the explicit published port for external HTTP(S) endpoints. Unknown published ports require explicit input. - **Kubernetes, including AKS-backed publishing:** derives defaults from matching literal Ingress/Gateway hostnames and TLS configuration. The scalar default is the first origin from the same matching routes. Hostless, wildcard, or deferred hostname sources require explicit input. - **Foundry:** uses the authority of the deployed project endpoint. - **Azure Sandboxes:** resolves the authority of the deployed proxy URL after producer deployment. - **Radius:** uses required deployment inputs for external HTTP(S) workload endpoints rather than cluster-local DNS. Unsupported recipe-backed endpoints are rejected. Compose, Kubernetes, and Radius keep scalar and list inputs separate: for example, `Parameters:web-http-PrimaryBrowserOrigin` contains one origin, while `Parameters:web-http-BrowserOrigins` contains the list. The scalar input is not obtained by splitting a configured list input. The manifest publisher lowers both properties to required inputs, including references inside selected conditional branches, formatted expressions, and resource manifest callbacks. Existing supported endpoint tokens remain symbolic for azd. Fixes #18819 ### Compatibility The endpoint properties are additive, but this PR includes behavioral compatibility changes: - For allocations completed through DCP or `PublishResourceEndpointsAllocatedAsync`, `WithUrls` and `WithUrlForEndpoint` callbacks now finish before `ResourceEndpointsAllocatedEvent` handlers run. Code registering URL customization inside those handlers must move registration into model configuration. Physical endpoint allocation and host/container service discovery remain unchanged. - Custom endpoint allocators that call `eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(resource, services), cancellationToken)` directly no longer trigger the orchestrator's URL processing: `WithUrls` / `WithUrlForEndpoint` callbacks do not run, generated dashboard URLs are not automatically published, and `BrowserOrigins` / `PrimaryBrowserOrigin` references can remain pending indefinitely unless canceled. After assigning the physical endpoints, use `eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(resource, services), cancellationToken)` to finalize URLs before notifying subscribers. Direct publication still dispatches the event and does not invalidate physical endpoint values. The existing MAUI synthetic OTLP stubs still use direct publication; browser-origin support for those stubs is not provided by this PR. - Manifest publication rejects unsupported `:uri` formatting on endpoint bindings and non-parameter connection-string references instead of silently dropping the format. For example, `ReferenceExpression.Create($"https://login.example/?redirect_uri={web.GetEndpoint("https"):uri}")` still resolves in run mode but fails manifest publication because azd cannot faithfully encode that reference. Use a parameter or infrastructure output for the full value that needs encoding, or configure the encoded value explicitly. Removing the format preserves the symbolic reference but does not encode it. ### Security considerations Origins can feed CORS allowlists and authentication redirect configuration. URL customization remains application-controlled; local vanity URLs are not silently reused as deployment addresses. No new listeners or authorization mechanisms are introduced. ### Validation Latest local validation covers implementation commit `14455757af`; current head `317e1b82a9` additionally removes the browser-origin section from the core package README. Snapshot updates were reviewed and the affected tests rerun. The repository SDK was used to build test projects. Tests were launched with the installed .NET 10 host because the repository-local SDK installation did not contain the required .NET 10 runtime. Quarantined and outerloop tests were excluded. <details> <summary>Exact local commands and results</summary> **Core endpoint references, manifest lowering, schema, and default compute-environment validation: passed, 195 tests.** ```powershell $env:MSBUILDTERMINALLOGGER='false' dotnet build tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --nologo -v:q & 'C:\Program Files\dotnet\dotnet.exe' artifacts\bin\Aspire.Hosting.Tests\Debug\net10.0\Aspire.Hosting.Tests.dll --filter-class '*.EndpointReferenceTests' --filter-class '*.ManifestExpressionTests' --filter-class '*.SchemaTests' --filter-class '*.ComputeEnvironmentValidationTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` **Compose browser-origin coverage: passed, 15 tests. Kubernetes browser-origin coverage: passed, 40 tests. Radius browser-origin coverage: passed, 11 tests.** Each corresponding project build succeeded. The test invocation below was executed for each listed project: ```powershell # $name: Aspire.Hosting.Docker.Tests, Aspire.Hosting.Kubernetes.Tests, # Aspire.Hosting.Radius.Tests dotnet build "tests\$name\$name.csproj" --nologo -v:q & 'C:\Program Files\dotnet\dotnet.exe' "artifacts\bin\$name\Debug\net10.0\$name.dll" --filter-method '*BrowserOrigin*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` **Entra provisioning class: 133 passed initially; the remaining test reported an expected Bicep snapshot change removing `first(split(...))`. After reviewing the updated snapshot, its focused rerun passed.** The project build succeeded. ```powershell dotnet build tests\Aspire.Hosting.Azure.EntraId.Tests\Aspire.Hosting.Azure.EntraId.Tests.csproj --nologo -v:q & 'C:\Program Files\dotnet\dotnet.exe' artifacts\bin\Aspire.Hosting.Azure.EntraId.Tests\Debug\net10.0\Aspire.Hosting.Azure.EntraId.Tests.dll --filter-class '*.EntraIdProvisioningTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' & 'C:\Program Files\dotnet\dotnet.exe' artifacts\bin\Aspire.Hosting.Azure.EntraId.Tests\Debug\net10.0\Aspire.Hosting.Azure.EntraId.Tests.dll --filter-method '*.Publish_EndpointRedirectUri_UsesContainerAppEnvironmentHostAndOutputs' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` **Generated SDK snapshots for TypeScript, Go, Java, Python, and Rust, plus the TypeScript browser-reference scanner check: passed, 6 tests in total.** Each corresponding project build succeeded. The following invocation was executed for each language project after reviewing regenerated snapshots: ```powershell # $name: Aspire.Hosting.CodeGeneration.<TypeScript|Go|Java|Python|Rust>.Tests dotnet build "tests\$name\$name.csproj" --nologo -v:q & 'C:\Program Files\dotnet\dotnet.exe' "artifacts\bin\$name\Debug\net10.0\$name.dll" --filter-method '*.TwoPassScanning_GeneratesWithEnvironmentOnTestRedisBuilder' --filter-method '*.Scanner_HostingAssembly_BrowserUrlReferences' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` **Deployment E2E project and Entra playground AppHost: builds passed.** The playground build reported existing ILCompiler package vulnerability warnings. ```powershell dotnet build tests\Aspire.Deployment.EndToEnd.Tests\Aspire.Deployment.EndToEnd.Tests.csproj --nologo -v:q dotnet build playground\EntraId\EntraId.AppHost\EntraId.AppHost.csproj --nologo -v:q ``` </details> The ACA starter and Foundry hosted-agent deployment scenarios now inject and assert `PrimaryBrowserOrigin` alongside `BrowserOrigins`, but **live deployment E2E tests were not run for the latest implementation**. Earlier smoke/deployment evidence is available in [the testing report](https://github.com/microsoft/aspire/pull/21260#issuecomment-6454741329) and [deployment run](https://github.com/microsoft/aspire/actions/runs/40592925144); those results predate the latest changes and do not validate them. The earlier run included a failing Sandbox port-exposure scenario. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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? - [x] Yes - If yes, did you have an API Review for it? - [ ] Yes - [x] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [x] Yes - [ ] No - [ ] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Copilot-Session: b3d226ee-2c7f-4986-a0e4-a6d27b72f6ecgithub.com-microsoft-aspire · bd4f4514 · 2026-11-06
- 3.3ETVStop persisting ambient NuGet policy into AppHost configs (#21373) ## Description Creating or updating an AppHost can copy machine-specific NuGet feeds and mappings into the project's `nuget.config`. Persisting the temporary discovery overlay also introduces a mapping `<clear />`, replacing inherited policy and making generated projects depend on the generating machine's configuration. Separate C# project persistence from temporary discovery policy. Persist the selected integration feed configuration as needed and maintain CLI-owned local entries without copying ambient configuration or inventing default package routing. `NuGetClient` remains unchanged. - Preserve the effective mapping mode. If no package-source mapping entries exist, add the channel feed without enabling mapping, so unrelated dependencies can continue using ambient feeds. If mapping is already enabled, persist the selected integration-specific mappings and preserve existing user mappings and their native precedence. - Do not copy ambient feeds or mappings, synthesize catch-all bindings, or introduce a mapping `<clear />`. Existing user-authored clears and `disabledPackageSources` entries remain untouched. - Retirement only removes owned records from the target file. Parent sources and mappings are neither modified nor suppressed, and their survival or reappearance does not prevent local removal. New mapping writes retain their alias-ownership checks. - Remove automatic NuGet.org fallback mappings from daily, staging, local/PR channels, and explicit-source composition. Ordinary stable uses ambient sources; an explicit stable integration-source override does not become an all-packages default. - Approval compares the original target file with the exact proposed persisted content, not the discovery overlay. Native candidate restore uses the preserved hierarchy and can reject an update that cannot restore without overriding user policy. Fixes #21362 ### Examples When ambient configuration has no package-source mappings, a newly generated configuration adds only the selected source. It does not enable mapping or serialize the generating machine's other feeds: ```xml <configuration> <packageSources> <add key="aspire-apphost-source" value="https://selected.example/v3/index.json" /> </packageSources> </configuration> ``` When mapping is already enabled, the generated file also contains the integration binding below. Ambient mappings remain inherited rather than being copied into this file: ```xml <packageSourceMapping> <packageSource key="aspire-apphost-source"> <package pattern="Aspire*" /> </packageSource> </packageSourceMapping> ``` Ordinary stable selection does not create a redundant configuration. Existing local CLI-owned channel records can be retired without changing parent configuration or disabled-source entries. ### Validation Final published-tree validation on macOS arm64: **1,511 passed, 0 failed, 1 skipped** across the affected CLI test classes, including the dedicated merger snapshots, creation and initialization, channel resolution, updater behavior, and native restore. The offline native-restore regression verifies that a configuration without mappings can restore packages from both ambient and selected local feeds. Generated snapshot changes were reviewed. <details> <summary>Exact broad test command</summary> ```bash MSBUILDTERMINALLOGGER=false ./.dotnet/dotnet test \ --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj \ --no-launch-profile -- \ --filter-class '*.DotNetAppHostNuGetConfigMergerTests' \ --filter-class '*.DotNetAppHostNuGetConfigMergerSnapshotTests' \ --filter-class '*.DotNetCliRunnerTests' \ --filter-class '*.NewCommandTests' \ --filter-class '*.NewCommandChannelResolutionTests' \ --filter-class '*.NewCommandLocalTemplateTests' \ --filter-class '*.NewCommandTemplateConfigPersistenceTests' \ --filter-class '*.InitCommandTests' \ --filter-class '*.UpdateCommandTests' \ --filter-class '*.ProjectUpdaterTests' \ --filter-class '*.ProjectUpdaterNuGetConfigurationTests' \ --filter-class '*.PackagingServiceTests' \ --filter-class '*.PackageChannelTests' \ --filter-class '*.PackageSourceOverrideMappingsTests' \ --filter-class '*.IntegrationPackageSearchServiceTests' \ --filter-class '*.TemplateNuGetConfigServiceTests' \ --filter-class '*.DotNetTemplateFactoryTests' \ --filter-class '*.BundleNuGetServiceTests' \ --filter-class '*.NuGetConfigurationTests' \ --filter-class '*.NuGetConfigurationQueryTests' \ --filter-class '*.NuGetPackageOperationConfigurationTests' \ --filter-class '*.AppHostServerProjectTests' \ --filter-class '*.PrebuiltAppHostServerTests' \ --filter-not-method '*.UpdateAsync_FileBasedNativePackageMetadataEditsSourceAndRollsBackOnFailure' \ --filter-not-method '*.UpdateAsync_UnresolvableSdkAndBackslashReference_RepairsSdkForNativeEvaluation' \ --filter-not-method '*.CreateProjectFiles_RestoreRootConfigDirectory_PreservesRelativeSources' \ --filter-not-trait 'quarantined=true' \ --filter-not-trait 'outerloop=true' ``` Result: 1,511 passed, 0 failed, 1 skipped. </details> The relative-source scenario excluded from the broad run also passed separately on the current head: ```bash MSBUILDTERMINALLOGGER=false ./.dotnet/dotnet test \ --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj \ --no-launch-profile -- \ --filter-method '*.CreateProjectFiles_RestoreRootConfigDirectory_PreservesRelativeSources' \ --filter-not-trait 'quarantined=true' \ --filter-not-trait 'outerloop=true' ``` Result: 1 passed, 0 failed. The two excluded updater native-restore scenarios were not validated in the final run. Quarantined and outerloop tests were excluded. CLI E2E tests were not run locally; CI/E2E validation of `5a5901bc08` remains outstanding. ## 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 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · bf296696 · 2026-10-30
- 2.2ETVSeparate channel update validation with aspire update --dry-run (#22207) ## Description Users should be able to apply a channel update without first requiring its dependency graph to restore. This separates applying a .NET channel update from validating it: normal updates selected through an option or Aspire configuration propose and apply confirmed changes without a validation restore, while `--dry-run` only validates and restores the original source files afterward. Updates without a command-line or configured channel retain their existing restore behavior. Both paths still reject unsafe NuGet configuration changes and customized restore policies that cannot be updated cleanly. ### User-facing usage Apply an update through the existing confirmation prompts: ```bash aspire update --channel daily ``` Validate instead, without update prompts or applying the changes: ```bash aspire update --channel daily --dry-run --non-interactive ``` New command option: ```text --dry-run Validate an explicit .NET AppHost channel update using temporary NuGet caches, without proposing or applying changes. ``` - Initial evaluation uses ambient NuGet configuration and caches to plan the edits. Validation uses private temporary package and HTTP cache folders under Aspire home, including SDK acquisition. Native restore receives `--packages`, `--no-http-cache`, and `--force`. - Before staging source edits, the dry run creates adjacent `<file>.aspire-backup` copies and restores from them on success, failure, or cancellation. Failed rollback retains recovery backups and reports their paths. Existing backups require separate replace-or-cancel consent; `--yes` never authorizes replacement, and non-interactive runs refuse. - Dry runs require `--channel` or legacy `--quality` with a channel other than `default`, and a .NET AppHost. They reject `--self`, `--migrate`, and `--config-source`, skip repository tool updates and CLI self-update prompts, and do not require `--yes` in non-interactive mode. - Restore-generated files such as `obj/project.assets.json` retain their existing behavior and are not backed up. ### Screenshots / Recordings > **This PR includes CLI interaction changes.** TODO: capture the normal channel-update confirmation flow, validation-only output, and the leftover-backup replace-or-cancel prompt. No recording is attached yet. ### Security considerations Dry runs temporarily edit project files and create adjacent recovery copies, as well as an isolated temporary NuGet cache under Aspire home. Backup staging files and validation directories use owner-only Unix permissions. Existing recovery backups cannot be silently overwritten, and rollback refuses to overwrite a concurrently edited source file. Security review has not been performed. Fixes #22214 ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · 30326eb8 · 2026-11-17
- 2.1ETVRecognize WSLc in Aspire doctor and clarify runtime selection (#21004) ## Description `aspire doctor` currently checks Docker and Podman even when WSLc is configured and supported by DCP for local development on Windows. This can report unrelated runtime problems instead of checking the runtime the user selected. This change recognizes Windows-only WSLc support and checks only the configured runtime when either runtime environment variable is set. Auto-detection reports all installed runtimes in Docker, Podman, WSLc priority order, marks the selected runtime, and makes incompatible alternatives non-blocking when a healthy runtime is available. Missing runtimes are omitted unless explicitly selected. Runtime probes share Aspire's existing availability check and process handling, with WSLc overriding host support and version metadata parsing. Caller cancellation is preserved. Publishing remains restricted to Docker and Podman; WSLc publish/deploy support is a follow-up, not part of this PR. ### Examples ```powershell aspire doctor $env:ASPIRE_CONTAINER_RUNTIME = 'wslc' aspire doctor ``` Example runtime output with multiple installed runtimes: ```text Docker v29.8.2: running ← active Podman: installed but not running WSLc v3.0.3.0: running ``` With WSLc explicitly configured: ```text WSLc v3.0.3.0: running ← explicitly selected ``` ### Validation - Passed: `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.ContainerRuntimeCheckTests' --filter-class '*.DoctorCommandTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` (75 tests). - Passed: `dotnet test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class '*.ContainerRuntimeDetectorTests' --filter-class '*.ContainerRuntimeResolverTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` (18 tests). - Passed: `dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-restore --verbosity quiet /p:SkipNativeBuild=true` (zero warnings/errors). The six new selection-indicator E2E cases verify text and JSON output for automatic selection, Podman fallback, and explicit Docker/Podman selection through both environment-variable names. E2E execution was not run locally; CI validation is pending. - Manually checked the locally built CLI with installed Docker, Podman, and WSLc, including automatic selection and explicit WSLc configuration. Both doctor runs exited 0. Also verified caller cancellation during an in-flight metadata query terminates the controlled probe process. Fixes: #20900 ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f85e4b06-371e-465a-8fd8-e635d14ec41fgithub.com-microsoft-aspire · 229db841 · 2026-10-15
- 1.9ETVPersist stable AppHost ports and add worktree isolation (#21013) ## Description Generated public ports are currently stable only in a few special cases, which means endpoint addresses can change across AppHost restarts and linked Git worktrees require explicit isolation. This change introduces a consistent persistent port model for both C# and polyglot AppHosts. Generated public ports are stored in an AppHost-local key/value state file under `.aspire/state`. The state store uses cross-process locking, atomic replacement, per-value schema versioning, and a product-owned `.gitignore`. Port allocation continues to treat executable target ports as transient, while preserving generated public ports that form the user-observable endpoint identity. The implementation also: - migrates existing `Resources:<resource>:<endpoint>:port` user-secret values when first encountered, without writing new allocations back to user secrets - adds `features.gitWorktreeIsolationEnabled` to automatically use isolated mode for AppHosts in linked Git worktrees, while preserving explicit `--isolated true|false` precedence - adds `portAllocation.persistInIsolatedMode` so isolated runs can opt into stable persisted ports - projects the AppHost-relative port policy consistently into managed C# and polyglot AppHosts ### User-facing usage ```json { "features": { "gitWorktreeIsolationEnabled": true }, "portAllocation": { "persistInIsolatedMode": true } } ``` By default, isolated mode continues to skip persisted allocations. Setting `persistInIsolatedMode` to `true` gives each AppHost/worktree identity stable generated ports across restarts. No additional dependencies are required. ### Validation - `dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build --no-launch-profile -- --filter-class "*.DcpExecutorTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"` - passed (314 succeeded, 1 platform-specific skip) - `dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-build --no-launch-profile -- --filter-class "*.AspireConfigFileTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"` - passed (41 succeeded, 1 platform-specific skip) - `./build.sh --build /p:SkipNativeBuild=true` - passed - CLI end-to-end coverage was added for C# and TypeScript linked-worktree restart stability; it was not run locally Fixes #20653 ## 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 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · 168a8b46 · 2026-11-09
- 1.6ETVRecover ambiguous DCP creates with configurable timeouts (#20752) ## Description A single timed-out or HTTP 504 DCP create currently puts a resource into `FailedToStart`, even though the server may have committed the object. The 20-second steady-state client budget can also expire before DCP's own create timeout, and users cannot configure those limits for slower environments. Recover ambiguous creates by checking whether the same kind/namespace/name exists before retrying the POST. Creation has a configurable two-minute recovery budget covering setup, requests, confirmation, and retry delays. Initial conflicts and permanent failures still fail, caller cancellation remains terminal, and successful sibling creates are not replayed. API operations now share one deadline between client setup and the request/retry work: 40 seconds plus a 20-second initialization allowance until the first successful API operation, then 40 seconds. Each operation selects its deadline once. Watch reconnects reselect the current budget without shortening in-flight requests or limiting established watch/log streams. KubernetesClient's independent 100-second request timer no longer truncates larger configured budgets. Production requests use Aspire's timeout policy, including the cleanup polling GET that previously bypassed it. No new dependencies are required. Fixes #20691 ### User-facing usage The default timeout settings can now be overridden in AppHost configuration: ```json { "DcpPublisher": { "KubernetesApiTimeout": "00:00:40", "KubernetesInitializationAdditionalTimeout": "00:00:20", "KubernetesCreateRecoveryTimeout": "00:02:00" } } ``` The initialization allowance may be zero. API and recovery budgets support one second through ten minutes; the API budget plus initialization allowance must not exceed ten minutes. ### Validation Passed: 97 selected tests, with no failures or skips. Coverage includes ambiguous-create confirmation/retries, permanent failures, caller cancellation, configuration validation, readiness-aware deadlines, watch reconnects, and established stream lifetimes. ```bash MSBUILDTERMINALLOGGER=false ./dotnet.sh test \ --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj \ --no-launch-profile --no-restore /p:SkipNativeBuild=true \ -- \ --filter-class '*.KubernetesServiceTests' \ --filter-class '*.ConfigureDefaultDcpOptionsTests' \ --filter-not-trait 'quarantined=true' \ --filter-not-trait 'outerloop=true' ``` No live DCP reproduction, end-to-end validation, or full test-suite run was performed for the final changes. ## 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 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · ccc9d55a · 2026-10-10
- 1.6ETVKeep DCP watches draining and close abandoned connections (#20972) ## Description Aspire can leave a DCP watch open without an active reader when watch setup is canceled or resource handlers pause event consumption. An unread HTTP/2 watch can exhaust its receive window and block DCP watcher publication and resource mutations. This change explicitly owns watch responses as soon as headers arrive and closes them on cancellation or periodic restart. An independent reader drains each stream into a lossless queue, so handler latency does not stop network reads. Resource event ordering and existing Aspire lifecycle callback dispatch are preserved. The reader distinguishes successful and failed Status payloads, surfaces malformed complete records, and recovers from truncated streams and retryable watch errors. The existing five-minute reconnection safeguard remains in place; this does not claim to resolve the separate historical connected-but-silent watch behavior. Lossless buffering means a persistently blocked handler can accumulate queued events rather than backpressure the API server. Related to [#20609](https://github.com/microsoft/aspire/issues/20609) and [microsoft/dcp#286](https://github.com/microsoft/dcp/issues/286). These are client-side fixes, not a replacement for the API server's slow-consumer handling. No dependency updates are required. ### Validation Behavioral regressions cover cancellation, paused consumers, event ordering, periodic reconnection, framing, and error recovery. All KubernetesServiceTests now use HTTPS/HTTP2 with one shared, test-owned certificate; certificate trust validation is disabled only in test clients. Passed on Windows: **98 tests, 0 failures**. ```powershell dotnet test --project .\tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class '*.KubernetesServiceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` ## 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 --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a4d11434-2c0b-4741-91ea-9eacc92ca29agithub.com-microsoft-aspire · 785cf4c7 · 2026-10-14
- 1.4ETVAdd initial WSLc publish/deploy support with explicit capability limits (#21009) ## Description WSLc can run Aspire apps on Windows, but publishing currently has no WSLc runtime implementation. This adds an initial, deliberately limited publishing implementation so supported image operations use the selected runtime and unsupported operations fail clearly instead of falling back or working around WSLc limitations. This PR targets `main` and builds on the runtime detection and doctor support from #21004, now incorporated into `main`. Supported on Windows: local Dockerfile builds without platform selection, image tagging/removal/push, registry login, native JSON image configuration inspection, and single-platform .NET SDK publishing to WSLc's local image store. Auto-discovery retains Docker → Podman → WSLc priority; explicit case-insensitive selection and custom keyed runtimes remain supported. Native SDK local publishing uses `LocalRegistry=Wslc` and requires an SDK containing the WSLc support introduced in [dotnet/sdk#55249](https://github.com/dotnet/sdk/pull/55249). It was verified with the repository-pinned SDK `11.0.100-rc.1.26425.128`; older SDKs without this support report an unsupported registry rather than falling back to another runtime. Aspire does not implement an archive/load bridge. Unsupported: Compose deployment/management, platform-selected Dockerfile builds, Dockerfile archives/OCI format selection, manifest inspection, multi-platform SDK publishing to WSLc's local image store, and container-file layering (which requires a platform-selected Dockerfile build). Multi-platform image loading is tracked by [microsoft/WSL#41123](https://github.com/microsoft/WSL/issues/41123). These paths reject explicitly using existing exception/inspection-result contracts. Daemon-free single- and multi-platform SDK archives remain supported without WSLc health checks or commands; archive publishing omits `LocalRegistry=Wslc`, preserving compatibility with SDKs that do not recognize it. No alternative builder or runtime fallback is introduced. Dockerfile builds in Docker, Podman, and WSLc now use `ProcessSpec.ArgumentList` instead of a manually quoted command line. Shared eager argument helpers preserve quotes, spaces, backslashes, empty values, and inherited environment values, retaining Podman's existing secret behavior. Platform-specific process argument handling remains owned by .NET, without invoking a shell. ### User-facing usage On Windows, select WSLc with `ASPIRE_CONTAINER_RUNTIME=wslc`. Single-platform .NET SDK publishing then uses WSLc's local store through the SDK's native support. Dockerfile publishing defaults to `linux/amd64`; explicitly opt into the WSLc host platform only when appropriate: ```csharp builder.AddDockerfile("program", "./program") .WithContainerBuildOptions(options => options.TargetPlatform = null); ``` For a .NET SDK archive without container-file layering: ```csharp project.WithContainerBuildOptions(options => { options.Destination = ContainerImageDestination.Archive; options.OutputPath = "./images"; }); ``` ### Validation - `.\restore.cmd /p:SkipNativeBuild=true` — passed during initial setup. - `.\.dotnet\dotnet.exe test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-launch-profile /p:SkipNativeBuild=true -- --filter-class '*.WslcContainerRuntimeTests' --filter-class '*.ContainerRuntimeResolverTests' --filter-class '*.ContainerRuntimeDetectorTests' --filter-class '*.DockerContainerRuntimeTests' --filter-class '*.ContainerRuntimeBaseTests' --filter-class '*.DotnetProgramArchiveTests' --filter-class '*.DotnetProgramPublishingTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` — passed, 151 tests after merging `main`, before the argument-list correction. - `.\.dotnet\dotnet.exe test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-launch-profile /p:SkipNativeBuild=true -- --filter-class '*.ContainerRuntimeBaseTests' --filter-class '*.DockerContainerRuntimeTests' --filter-class '*.PodmanSaveArgumentsTests' --filter-class '*.WslcContainerRuntimeTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` — passed, 95 tests after the argument-list correction and eager helper changes. The runtime-constant follow-up was rebuilt with `--filter-method '*.BuildImageAsync_PreservesArgumentBoundaries'` (same project and exclusions) — passed, 3 cases. The complete 95-test selection was rerun with `--no-build` immediately before pushing — passed. - `.\.dotnet\dotnet.exe test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-build --no-launch-profile -- --filter-method '*.BuildSecretsFormats*' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` — passed, 4 tests after the argument-list correction. - `.\.dotnet\dotnet.exe test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-build --no-launch-profile -- --filter-class '*.DotnetProgramArchiveTests' --filter-class '*.DotnetProgramPublishingTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` — passed, 48 tests after the argument-list correction. - `.\.dotnet\dotnet.exe test --project tests\Aspire.Hosting.Tests\Aspire.Hosting.Tests.csproj --no-build --no-launch-profile -- --filter-method '*.BuildImageAsync_Dotnet*' --filter-method '*.BuildImageAsync_ProjectBuildPassesResolvedContainerRuntimeAsLocalRegistry' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` — passed, 20 tests after the SDK correction and before the `main` merge. - `.\.dotnet\dotnet.exe publish '<probe-directory>\probe.csproj' --configuration Release /t:PublishContainer --property:LocalRegistry=Wslc --property:ContainerRepository=aspire-wslc-sdk-probe-b35fa7a4 --property:ContainerImageTag=single --property:RuntimeIdentifier=linux-x64 --property:ContainerRuntimeIdentifier=linux-x64 --property:ContainerBaseImage=mcr.microsoft.com/dotnet/runtime:10.0 --source https://packagefeedproxy.microsoft.io/nuget/v3/index.json` — passed using a temporary minimal net10.0 console project and SDK `11.0.100-rc.1.26425.128`. SDK reported successful publication via Wslc; `wslc image inspect aspire-wslc-sdk-probe-b35fa7a4:single --format json` confirmed linux/amd64. Probe image and project cleaned up; the path above is a placeholder for that temporary directory. - Installed WSLc 3.0.3.0: verified local Dockerfile build and native `image inspect --format json`; inspected tag/remove/push/login/build help and DCP's WSLc adapter. Direct `--output type=docker` and `--output type=oci` probes both failed with the Docker-driver exporter limitation, confirming the explicit archive boundary. Probe image/files cleaned up. - Local E2E tests were not run; no E2E tests were added. Linux/macOS execution and live registry push/login were not validated locally. - Existing NU1902/NU1903 warnings for `System.Security.Cryptography.Pkcs` 10.0.12 remain; no dependency changes are included. ### Security considerations The selected WSLc executable is trusted in the same way as Docker/Podman. Image commands use the existing process runner; registry passwords remain on stdin and environment build secrets follow the existing runtime pattern. Native image inspection uses source-generated JSON deserialization and preserves the image reference as a single process argument. Dockerfile build invocations for all three runtimes now preserve argument boundaries through `ProcessSpec.ArgumentList`. No listener, elevated execution, archive extraction, or Aspire-managed archive/load bridge is added. A separate security review has not been performed. Fixes # (issue) ## 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 - [x] No - [x] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f85e4b06-371e-465a-8fd8-e635d14ec41f Copilot-Session: b35fa7a4-1433-4b70-9840-5f5866230ff4github.com-microsoft-aspire · 64ba1ebd · 2026-11-06