Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove Aspire Workload and Add Deprecation Warning for .NET 10 SDK #49534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 24, 2025

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Jun 23, 2025

Fixes #49278

Eliminate the Aspire workload and its associated manifest. Introduce a warning message for users attempting to manually install the Aspire workload, guiding them to alternative options.

Here is the experience of running a few of the workload commands after these changes:

image

cc: @baronfel, @marcpopMSFT, @DamianEdwards, @davidfowl, @maddymontaquila

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 23:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes support for the Aspire workload, introduces a deprecation warning for any manual Aspire install attempts, and updates related tests, manifests, and localized resources.

  • Removed Aspire entries from workload manifests, layout targets, version props, and CLI string resources.
  • Updated existing tests to drop Aspire expectations and added new tests verifying the deprecation warning.
  • Enhanced WorkloadInstallCommand to filter out "aspire" and emit a one-time deprecation message.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Cli/dotnet/Commands/Workload/Install/WorkloadInstallCommand.cs Added logic to skip "aspire" and show deprecation
src/Cli/dotnet/Commands/CliCommandStrings.resx Added new resource string for Aspire deprecation
src/Layout/redist/targets/BundledManifests.targets Removed Aspire workload from bundled manifests
eng/Versions.props Removed Aspire feature band and manifest version
test/dotnet.Tests/.../GivenDotnetWorkloadUpdate.cs Updated workload update tests to drop Aspire
test/dotnet.Tests/.../WorkloadInstallAspireDeprecationTests.cs Added tests for Aspire deprecation warning
test/dotnet-MsiInstallation.Tests/... Replaced Aspire references with wasm-tools in tests
src/Cli/dotnet/Commands/xlf/CliCommandStrings.*.xlf Inserted new translation stubs for deprecation msg
documentation/general/workloads/workload-diagnosis.md Removed outdated Aspire mention from docs
Comments suppressed due to low confidence (1)

src/Cli/dotnet/Commands/Workload/Install/WorkloadInstallCommand.cs:72

  • [nitpick] Consider renaming this method to reflect its side effects (filtering IDs and logging a deprecation message), e.g., FilterWorkloadIdsAndShowDeprecation, to make its intent clearer.
    private IReadOnlyCollection<string> GetValidWorkloadIds()

@joperezr
Copy link
Member Author

In my latest commit, I also added a new warning that will be displayed for projects that depend on the old aspire workload, with instructions on how to upgrade. Here is how that looks like after these changes:

image

Copy link
Member

@joeloff joeloff left a comment

Choose a reason for hiding this comment

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

Looks good, not going to block on generalizing it. If we ever do a second removal we can generalize this to avoid having special cases.

Detection logic:
- IsAspireHost='true' indicates this is an Aspire host project
- AspireHostingSDKVersion is set by Aspire.AppHost.Sdk in new projects (9.0.0+)
- If AspireHostingSDKVersion is missing or < 9.0.0, this is likely an old workload-based project
Copy link
Member

Choose a reason for hiding this comment

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

you say likely here. Are there any scenarios where we'd be giving customers a build error if we shouldn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a very unlikely scenario where the new MSBuild SDK doesn't restore properly, and since that is the thing that defines AspireHostingSDKVersion you could run into a situation where the project is using the new aspire but didn't detect this property (as the sdk failed to load/restore) so in that case it would be a false positive. Worth noting that while we've had reports of this happening once or twice in the past, we have never been able to repro it.

@joperezr joperezr enabled auto-merge June 24, 2025 23:11
@joperezr joperezr disabled auto-merge June 24, 2025 23:11
@joperezr joperezr enabled auto-merge (squash) June 24, 2025 23:11
@joperezr joperezr merged commit 2dfc2c3 into main Jun 24, 2025
30 checks passed
@joperezr joperezr deleted the RemoveAspireWorkload branch June 24, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Aspire from sdk-manifests in SDK 10.0.
3 participants