dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.23k stars 1.35k forks source link

Buildcheck template - grace handle names/dirs starting with numbers #10606

Open JanKrivanek opened 2 months ago

JanKrivanek commented 2 months ago

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

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

JanKrivanek commented 2 months ago

Team triage: P2 - as we can ship template out of band

JanKrivanek commented 2 months ago

Can be documented in https://github.com/dotnet/msbuild/issues/10449