Bug: Fails to build when project name starts with a number
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 665
- Forks
- 134
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
Description
I created a C# WinUI3 project that starts with a number and it fails to build.
Steps To Reproduce
- Create a new C# WinUI3 project using the project template, named "1-HelloWorld" (doesn't matter whether it creates the solution in the same folder with the project or not)
- Build it
Expected Behavior
Builds fine. C++WinRT handles this scenario correctly.
Version Info
- Microsoft.WindowsAppSDK 2.4.0
- Microsoft.Windows.SDK.BuildTools 10.0.28000.2705
which includes WinRT.Runtime.dll version 2.2.0.48161
Additional Context
C++WinRT will prepend an underscore for the namespace name.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by creating and building a C# WinUI3 project named "1-HelloWorld". Trace the project-template build and namespace-generation path, using the C++/WinRT underscore behavior in the issue as context; done means the numeric-prefixed project builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100