Skip to content

[release/17.0] Expose AppHost SDK version during project evaluation - #22636

Merged
Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
damianedwards-backport-apphost-sdk-version
Nov 25, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
damianedwards-backport-apphost-sdk-version

Conversation

@DamianEdwards

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: b8c280042a8d187ad2740dc1b3b1df9843c1a271

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Net diff of #22454 applied; only conflict was test csproj None items.
↑ AppHostSdkTargetsTests on release/17.0: 93 passed, 0 failed.
↑ Packed package shows stamped props importing Common.props.
↓ Source PR #22454 is not yet merged; later commits are not included.
↓ CI not yet observed.
Diagnosis confidence 9/10 ↑ Issue repro shows the property set only in late-imported targets.
Evidence fit 9/10 ↑ Regression test reproduces the reported project-body VersionedDir scenario.

Backport of #22454 to release/17.0

Manual backport: the /backport bot failed with a conflict in tests/Aspire.Hosting.Sdk.Tests/Aspire.Hosting.Sdk.Tests.csproj, resolved by adding all three AppHost build-file None items (release/17.0 lacked the existing ones from main).

/cc Damian Edwards (@DamianEdwards)

Customer Impact

Package-based AppHosts (Microsoft.NET.Sdk + Aspire.Hosting.AppHost, the 17.0 replacement for Aspire.AppHost.Sdk) set AspireHostingSDKVersion too late for project-body properties to use it. Customers migrating off the SDK silently get empty version segments (e.g. a version-pinned AspireCliBundlePath) with no build warning. Workaround is explicit Sdk.props/Sdk.targets imports. (#22389)

Testing

Updated regression test for a project-body property using AspireHostingSDKVersion. On release/17.0: AppHostSdkTargetsTests 93 passed, 2 skipped (Unix-only), 0 failed. Packed Aspire.Hosting.AppHost and verified the stamped build/Aspire.Hosting.AppHost.props imports Aspire.Hosting.AppHost.Common.props. Source PR also validated scratch single- and multi-target projects against a locally packed package.

Risk

Low. Limited to the AppHost package's MSBuild props/targets: adds an early version default in the package props entry point while preserving explicit overrides, legacy Aspire.AppHost.Sdk precedence, and the existing targets fallback. No public API changes.

Regression?

Yes, relative to Aspire.AppHost.Sdk, where the property worked in project-body properties; the package-based AppHost never supported it.

Backport of #22454 to release/17.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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 -- 22636

Or

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 25, 2026 00:10
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

45 / 101 PR test projects · 3 PR jobs, from 5 changed files.

Selected PR test projects (45 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Sdk.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests, Aspire.Playground.Tests

Selected PR jobs (3)

cli-starter-validation, extension-e2e, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 27 of the 45 selected test projects come from a single change — src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj.

🔧 src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj (changed source)
→ 27 via the project graph

show 27

Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.Yarp.Tests

🔧 src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.targets (changed source)
→ 16 via the project graph

show 16

Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Playground.Tests

📦 affected project Aspire.Hosting.AppHost
→ 1 test: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.props (changed source)
→ 1 via the project graph: Aspire.Hosting.Sdk.Tests

🧪 tests/Aspire.Hosting.Sdk.Tests/AppHostSdkTargetsTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Sdk.Tests

🧪 tests/Aspire.Hosting.Sdk.Tests/Aspire.Hosting.Sdk.Tests.csproj (changed test)
→ 1 directly: Aspire.Hosting.Sdk.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Hosting.AppHost
extension-e2e • src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj, src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.props, src/Aspire.Hosting.AppHost/build/Aspire.Hosting.AppHost.in.targets
• affected project Aspire.Hosting.AppHost
typescript-api-compat affected project Aspire.Hosting.AppHost

Selection computed for commit b8c2800.

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 this backport, which makes AspireHostingSDKVersion available during project-body evaluation after NuGet restore.

No open issues 🎉

What changed in this PR

Backports #22454 to release/17.0, addressing #22389 by making AspireHostingSDKVersion available during project-body evaluation for package-based AppHosts after NuGet restore.

Changes:

  • Adds an early, version-stamped props entry point while preserving explicit overrides, legacy SDK precedence, and the targets fallback.
  • Updates regression coverage for project-body properties that reference the version.
  • Documents restore requirements and import-order limitations.
File Description
tests/​Aspire.Hosting.Sdk.Tests/​Aspire.Hosting.Sdk.Tests.csproj Includes build files used by temporary test projects.
tests/​Aspire.Hosting.Sdk.Tests/​AppHostSdkTargetsTests.cs Tests project-body version availability and generates stamped props in the test helper.
src/​Aspire.Hosting.AppHost/​build/​Aspire.Hosting.AppHost.in.targets Clarifies the existing fallback’s purpose in a comment; no behavior change.
src/​Aspire.Hosting.AppHost/​build/​Aspire.Hosting.AppHost.in.props Adds the early version default and imports common props.
src/​Aspire.Hosting.AppHost/​Aspire.Hosting.AppHost.csproj Packages the stamped props entry point alongside common props.
docs/​migrate-from-apphost-sdk.md Explains when the version property becomes available.

Review effort: Balanced

@DamianEdwards

Copy link
Copy Markdown
Member Author

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.

I'm OK taking this fix, but this feels more like a band-aid than the long-term solution. We are supplying an Aspire SDK version even though these AppHosts no longer use an Aspire SDK, to satisfy the .NET SDK's old workload-migration check.

I've filed dotnet/sdk#57356 to remove that check. The workload-based project model is over three years old now. Once the SDKs we support no longer contain the check, we should come back and clean up these temporary package property defaults, accounting for the remaining tooling consumers.

@joperezr
Jose Perez Rodriguez (joperezr) merged commit b4d3d31 into release/17.0 Nov 25, 2026
314 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 25, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

excluded → base_branch_is_release, title_release_prefix, body_backport_marker. This is a backport of #22454 to release/17.0 (title prefixed [release/17.0], body says "Backport of #22454"). No signals triggered; docs belong with the original forward PR.

This was referenced Dec 5, 2026
Benjamin Michaelis (BenjaminMichaelis) pushed a commit to BenjaminMichaelis/sheaf that referenced this pull request Dec 5, 2026
Updated [aspire.cli](https://github.com/microsoft/aspire) from 17.0.0 to
17.0.1.

<details>
<summary>Release notes</summary>

_Sourced from [aspire.cli's
releases](https://github.com/microsoft/aspire/releases)._

## 17.0.1

## What's New in Aspire 17.0.1

Patch release for Aspire 17.0 that fixes AppHost updates and debugging,
improves dashboard and tray usability, and updates container
orchestration and PostgreSQL integrations.

### 🐛 Fixes

- ⌨️ **`aspire update` honors configured channels for C# AppHosts** — An
explicit `--channel` still takes precedence. Confirmed channel updates
no longer require a successful validation restore; use `--channel <name>
--dry-run` to validate without keeping the edits. Restore failures show
NuGet and MSBuild diagnostics, with best-effort redaction of credentials
in known package-source URLs.
([#​22219](microsoft/aspire#22219), @​danegsta,
@​JamesNK)

- 🖥️ **The dashboard keeps you on Home when the window narrows** — The
narrow layout shows resources in a drawer and provides a Home tab.
Widening the window restores the resource table without navigating away.
([#​22478](microsoft/aspire#22478),
@​IEvangelist)

- 🖥️ **The dashboard resource list defaults to Comfortable** — Resource
state and type are visible on a second line. Saved density settings are
preserved, and Compact is still available under **Settings >
Appearance**.
([#​22391](microsoft/aspire#22391), @​JamesNK)

- 🖥️ **Dashboard tooltips and context menus behave as expected** —
Tooltips on controls and resource graph nodes work over plain HTTP on
non-localhost addresses. Opening a context menu with the pointer no
longer highlights the first item as if it were hovered; keyboard focus
remains visible when navigating by keyboard.
([#​22424](microsoft/aspire#22424),
[#​22388](microsoft/aspire#22388), @​JamesNK)

- 💻 **Azure Functions breakpoints work again in Visual Studio** — Visual
Studio can launch and debug Azure Functions projects through its native
project launcher. VS Code's launch behavior is unchanged.
([#​22401](microsoft/aspire#22401), backport of
[#​22346](microsoft/aspire#22346), @​karolz-ms)

- 🛠️ **AppHost tests run through Microsoft.Testing.Platform** — `dotnet
test` now uses the generated test entry point for test apps that
reference `Aspire.Hosting.AppHost`, instead of launching the Aspire CLI.
([#​22444](microsoft/aspire#22444), backport of
[#​22381](microsoft/aspire#22381), @​afscrome)

- 🛠️ **Coordinated Windows builds avoid a Blazor WebAssembly task
failure** — Aspire disables MSBuild's multithreaded mode for its
generated Windows build projects on SDKs that support the switch, so the
build can complete before browser debugging starts.
([#​22576](microsoft/aspire#22576), backport of
[#​22526](microsoft/aspire#22526), @​radical)

- 🛠️ **Package-based AppHosts expose their SDK version during project
evaluation** — Properties in the project file can now use
`$(AspireHostingSDKVersion)`, for example to set a versioned
`AspireCliBundlePath`.
([#​22636](microsoft/aspire#22636),
@​DamianEdwards)

- 🔄 **Container network tunnels recover more reliably** — The bundled
Developer Control Plane (DCP) moves from 0.27.3 to 0.27.5, preserving
endpoint state and published URLs across proxy recovery and retaining
the final container network disconnect in resource status.
([#​22482](microsoft/aspire#22482), @​karolz-ms;
[DCP
changelog](microsoft/dcp@v0.27.3...v0.27.5))

- 📦 **Layered .NET container archives match SDK output** — Projects that
add files with `PublishWithContainerFiles` can export OCI archives on
Docker Engine 25 or later. Output naming and compression now match the
.NET SDK, and `ContainerImageReference` points to the actual archive
when `OutputPath` is a directory.
([#​22672](microsoft/aspire#22672), backport of
[#​22666](microsoft/aspire#22666), @​eerhardt)

- 🐘 **PostgreSQL EF Core integrations use stable Npgsql providers** —
The standard and Azure PostgreSQL EF Core integrations move from an RC
to Npgsql EF Core 11.0.0 on .NET 11, and from 10.0.3 to 10.0.4 on .NET
10. ([#​22797](microsoft/aspire#22797),
@​eerhardt)

- 🖱️ **The tray scrollbar responds to the pointer** — Drag the scrollbar
thumb or click the track to move through a long list of AppHosts.
([#​22808](microsoft/aspire#22808), backport of
[#​22801](microsoft/aspire#22801), @​davidfowl)

- 🌐 **Translations are refreshed** — Updates missing or stale
translations for the dashboard, CLI, VS Code extension, and templates.
([#​22596](microsoft/aspire#22596), @​JamesNK)

- 📊 **Dashboard product telemetry includes more error detail** — When
product telemetry is enabled, dashboard error events include exception
messages and stack traces, truncated when needed. These fields can
contain information such as resource names or workspace paths.
`ASPIRE_DASHBOARD_TELEMETRY_OPTOUT=true` still disables dashboard
product telemetry export.
([#​22712](microsoft/aspire#22712), backport of
[#​22705](microsoft/aspire#22705), @​JamesNK)

---

*Full Changelog:
[v17.0.0...v17.0.1](microsoft/aspire@v17.0.0...v17.0.1)*

*Full commit:
[81f56a6b6c58135826723e0e84426b2c42efcfe6](microsoft/aspire@81f56a6b6c58135826723e0e84426b2c42efcfe6)*


Commits viewable in [compare
view](microsoft/aspire@v17.0.0...v17.0.1).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aspire.cli&package-manager=nuget&previous-version=17.0.0&new-version=17.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants