Visual Studio 2022 Template "ASP.NET Core Web App" converts hyphens to underscores in _Layout.cshtml css href, causing 404 on the css when debug/run.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
Using Visual Studio 2022 Template "ASP.NET Core Web App", the new project converts hyphens to underscores in _Layout.cshtml css href for the css "isolation" file.
I know this seems minor but I (stupidly) spent a lot of time before I noticed the conversion of hyphens to underscores and I found a bunch of other issues related to css isolation here so thought this may help someone.
Note that command line `dotnet new razor` doesn't have this issue (which is how I found the resolution).
### Expected Behavior
Don't do that.
### Steps To Reproduce
Create new project using the above template with project named "test-asp-net-6-app". After project is created the stylesheet link is created with underscores instead of hyphens causing a 404 on the style sheet when running the app.
**_Layout.cshtml**
``

The build/runtime is expecting a style sheet file with hyphens: `test-asp-net-6-app.styles.css`
### Exceptions (if any)
_No response_
### .NET Version
6.0.402
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.