dotnet / dotnet/aspnetcore

Erroneous `////` in default URL for a blazorwasm template parameter

Open
#44,894 7 comments 1 reaction 1 assignee Assigned to @Copilot View on GitHub
area-blazor bug copilot-candidate feature-templates Pillar: Technical Debt
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

This came up previously with an `appsettings.json` file, but I noticed it while exploring the parameters for the `blazorwasm` template, and I don't think that's been addressed yet.

![image](https://user-images.githubusercontent.com/5761601/200120409-a6188111-819a-4b24-91c3-451d3cdaaf5a.png)

It appears to me that this was unintentional. I have a fork and branch at the ready for a PR to fix this issue [available here](https://github.com/dotnet/aspnetcore/compare/main...jdmallen:jdmallen/fix-broken-default-url).

### Expected Behavior

I expected a correct and valid URL format to be supplied as a default value that clearly requires one.

### Steps To Reproduce

Repro:
1. Install latest .NET SDK (Host: 6.0.10, SDK: 6.0.402 as of this issue)
1. Execute `dotnet new blazorwasm -h`
1. Scroll down to parameter `--aad-b2c-instance`
1. Note the "Default" value of `https:////aadB2CInstance.b2clogin.com/` verbatim and compare it to other default values on the screen.

### Exceptions (if any)

_No response_

### .NET Version

6.0.402

### Anything else?

It's also worth noting that there's a similar issue with the "replaces" value at [this line](https://github.com/jdmallen/aspnetcore/blob/6d041a013c48f3fa3bd8adeef39f91d730e01830/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/.template.config/template.json#L389), but since it has a "defaultValue" also configured, the URL with the `////` is not rendered to screen. I can fix that one, too, if you like, but figured I'd keep the commit focused.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.