dotnet / dotnet/msbuild

Buildcheck template - grace handle names/dirs starting with numbers

Open
#10,606 2 comments 0 reactions 0 assignees View on GitHub
Area: BuildCheck bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Context

If `msbuildcheck` template is being instantiated with name (or implicit name derived from the current dir name) that starts with number - the include item fro the 'magic' props is broken

### Repro steps

* `dotnet new msbuildcheck -n 123`
* The created csproj will contain broken include (the name `_123.props` doesn't correspond with the filename - `123.props`):
```




```

### Analysis

This has to do with templating feature that is trying to make the names a valid C# token names - so numbers are auto-prefixed with '_'. We need to make sure that the include link is not expanded like this, or that the props file name is generated that way

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.