Remove singlefileAppHostEnabled feature flag and set minimum SDK to .NET 10 #12171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the
features.singlefileAppHostEnabledfeature flag and sets the minimum required SDK to .NET 10.0.100, making single-file AppHost support a standard feature of Aspire.Changes
Minimum SDK Version
DotNetSdkInstaller.MinimumSdkVersionfrom"9.0.302"to"10.0.100"MinimumSdkNet10SdkVersionconstantGetEffectiveMinimumSdkVersion()to no longer check feature flagsFeature Flag Removal
SingleFileAppHostEnabledfromKnownFeatures.csProjectLocator: Always searches for single-file apphosts (apphost.cs)DotNetTemplateFactory: Always shows single-file templates (aspire-py-starter,aspire-apphost-singlefile)PublishCommandBaseandRunCommand: Removed feature flag validationInitCommand: Always uses single-file AppHost templateCode Cleanup
featuresparameter fromProjectLocatorconstructorFindAppHostProjectFilesAsync_IgnoresSingleFileAppHostWhenFeatureDisabledUseOrFindAppHostProjectFileAsync_RejectsExplicitSingleFileAppHostWhenFeatureDisabledUseOrFindAppHostProjectFileThrowsWhenDirectoryHasSingleFileAppHostButFeatureDisabledRunCommand_WhenSingleFileAppHostAndFeatureDisabled_ReturnsNonZeroExitCodeImpact
Single-file AppHost support is now always enabled and requires .NET 10.0.100 or later. This aligns with the repository's existing
global.jsonconfiguration which already specifies .NET 10.0.100-rc.2.25502.107.Testing
All 470 relevant tests pass, including:
DotNetSdkInstallerTests- Verifies minimum SDK version detectionDotNetTemplateFactoryTests- Confirms single-file templates are visibleProjectLocatorTests- Validates single-file apphost discoveryInitCommandTests- Tests AppHost initializationOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.