Upgrade MSBuild dependencies after dropping .NET 8 support in Aspire 14.0
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues.
### Is your feature request related to a problem? Please describe the problem.
The third-party dependency refresh in #20046 attempted to update Microsoft.Build and Microsoft.Build.Framework from 18.3.3 to 18.10.1, and Microsoft.Build.Locator from 1.9.1 to 1.11.2. This exposed a framework compatibility failure in Aspire.Hosting.Tasks, which still targets net8.0 and net472.
CentralPackageTransitivePinningEnabled causes the newer Microsoft.Build.Framework and its Microsoft.NET.StringTools dependency to flow into the task project through Microsoft.Build.Utilities.Core 17.9.5. CI fails before tests because the newer packages reject net8.0 and require net11.0. The package-support errors are visible in [the Hosting.Seq CI job](https://github.com/microsoft/aspire/actions/runs/34655909291/job/103455754219).
### Describe the solution you'd like
Schedule the MSBuild dependency upgrade for Aspire 14.0, when .NET 8 support is planned to be removed. Remove this upgrade from #20046 in the meantime.
When implementing:
- Select MSBuild package versions compatible with the actual post-.NET-8 target frameworks; dropping .NET 8 alone does not establish that a net11-only package is compatible with every remaining consumer.
- Audit both direct and centrally pinned transitive dependencies, including Microsoft.Build.Framework and Microsoft.NET.StringTools.
- Preserve the older Visual Studio/net472 task-host contract unless that support is deliberately changed. Microsoft.Build.Utilities.Core currently has an explicit do-not-upgrade compatibility pin.
- Verify Aspire.Hosting.Tasks on every retained target, packaged task loading, and SelectTests ProjectGraph behavior with the repo-local SDK/MSBuildLocator.
- Do not suppress target-framework support checks as a workaround.
### Additional context
The user requested this follow-up for milestone 14.0. The bulk dependency PR remains #20046; quarantine-only upgrades remain in the separate stacked #20074. This issue concerns MSBuild only.
Contributor guide
Research direction
Start by reviewing dependency changes in #20046 and the central pins affecting Aspire.Hosting.Tasks, including Microsoft.Build.Framework and Microsoft.NET.StringTools. Confirm compatible versions for retained targets, preserve the net472 task-host contract, and verify task loading and SelectTests ProjectGraph behavior with the repository SDK/MSBuildLocator without suppressing framework checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100