Open danroth27 opened 11 months ago
@danroth27 It's been that way since Blazor 3.0/3.1 and MVC.
It's a well-known template/bug/limitation, I believe.
Dug out how to do this.
Should be doable I think with a generated parameter and a regex like:
{
"regex": " ", //The regular expression whose matches will be replaced with '[Replaced]`
"replacement": "_" //The value to replace matches of the expression '^test' with
},
Then we would need to change that in the layout, so that it replaces AssemblyName.styles.css
or similar.
https://github.com/dotnet/templating/wiki/Available-Symbols-Generators#samples-7
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
Adding to the symbols
"StyleBundleName":{
"type": "generated",
"generator": "regex",
"replaces": "StyleBundleName",
"parameters": {
"source": "name",
"steps": [
{
"regex": " ",
"replacement": "_"
}
]
}
},
And
<link rel="stylesheet" href="BlazorWebStyleBundleName.styles.css" />
to App.Razor should fix it.
We should do this across all our templates.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
We get a report from VS feedback that hyphens in the project name also break compilation of the template.
This user created their first Blazor app with a project that had a space in its name, which broke downloading the styles bundle: https://github.com/dotnet/core/issues/8939.
Repro steps:
Expected result: App runs fine Actual result: