dotnet / dotnet/sdk

Cannot create a `blazorwasm` or `blazor` template project with name including emoji

Open
#41,667 8 comments 0 reactions 0 assignees View on GitHub
Area-dotnet new Area-Templates
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

Project created with - `dotnet new blazorwasm -o "blazorwasm_πŸ˜€"`, fails to build with:

```
$ dotnet build -bl
Restore complete (15.9s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
blazorwasm_πŸ˜€ failed with errors (1.8s)
/private/tmp/bl/blazorwasm_πŸ˜€/Program.cs(3,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(9,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]
/private/tmp/bl/blazorwasm_πŸ˜€/_Imports.razor(10,7): error CS0246: The type or namespace name 'blazorwasm__' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/bl/blazorwasm_πŸ˜€/blazorwasm_πŸ˜€.csproj]

Build failed with errors in 17.9s
```

This was with `.net sdk` `9.0.100-preview.3.24157.9`. It is also reproducible with `8.0.200`.

### Expected Behavior

_No response_

### Steps To Reproduce

1. `dotnet new blazorwasm -o "blazorwasm_πŸ˜€"`
2. `cd "blazorwasm_πŸ˜€"`
3. `dotnet build`

### Exceptions (if any)

_No response_

### .NET Version

_No response_

### Anything else?

`.log` appended to the name to satisfy github.
[msbuild.binlog.log](https://github.com/user-attachments/files/15878526/msbuild.binlog.log)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.