Skip to content

Ensure repeated hyphens are replaced with single hyphens in new projects' localhost host name prefixes#65027

Merged
DamianEdwards merged 1 commit intomainfrom
damianedwards/follow-up-localhost-prefix-template-fix
Jan 13, 2026
Merged

Ensure repeated hyphens are replaced with single hyphens in new projects' localhost host name prefixes#65027
DamianEdwards merged 1 commit intomainfrom
damianedwards/follow-up-localhost-prefix-template-fix

Conversation

@DamianEdwards
Copy link
Member

Ensure repeated hyphens are replaced with single hyphens in new projects' localhost host name prefixes

Description

Ensures that there are no repeated hyphens in the host name generated for new projects that opt-in to the *.dev.localhost host name.

Related to #64978

@DamianEdwards DamianEdwards requested review from BrennanConroy and Copilot and removed request for Copilot January 12, 2026 22:57
@github-actions github-actions bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 12, 2026
@DamianEdwards DamianEdwards enabled auto-merge (squash) January 13, 2026 00:09
@DamianEdwards DamianEdwards merged commit 98fbe05 into main Jan 13, 2026
31 of 32 checks passed
@DamianEdwards DamianEdwards deleted the damianedwards/follow-up-localhost-prefix-template-fix branch January 13, 2026 18:58
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Jan 13, 2026
DamianEdwards added a commit that referenced this pull request Jan 13, 2026
wtgodbe pushed a commit that referenced this pull request Jan 14, 2026
…stnames in launch profiles (#65048)

* Fix DNS-invalid hostnames with underscores in dotnet new templates (#64988)

* Initial plan

* Add DNS-safe hostname forms and symbols to templates

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Add trimming of leading/trailing hyphens for DNS-safe hostnames

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Use distinct placeholder LocalhostTldHostNamePrefix for hostname replacement

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Add tests for DNS-compliant hostname generation with --localhost-tld

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Add tests for DNS-compliant hostname generation in Blazor templates

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Move VerifyDnsCompliantHostname to shared Project class

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Fix -n parameter conflict and add tests with numbers in project names

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Refactor DNS hostname tests to use Theory with InlineData

Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>

* Fix razorcomponent item test

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>
Co-authored-by: Damian Edwards <damian@damianedwards.com>

* Add replaceRepeatedHyphens step to template processing and update tests for DNS-compliant hostnames (#65027)

Related to #64978

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments