`dotnet new` emits files with two periods before extension
See original GitHub issueDescribe the bug
Now that we’ve upgraded our repo requirements a la global.json to .NET 7.0.11, our dotnet new azsdkdbg
now emits files with two periods before the extension e.g., “Azure.Template…csproj”, “Azure.Template…sln”, etc.
To Reproduce
- Shallow clone the https://github.com/Azure/azure-sdk-for-net repo:
git clone --depth=0 https://github.com/Azure/azure-sdk-for-net.git
- Install the template:
dotnet new install sdk/template
- Use the template:
dotnet new azsdk -o sdk --serviceDirectory test --groupName dotnet --clientName TestClient
Exceptions (if any)
No exception, but show the files in the sdk/dotnet directory example tree /f
and notice a number of generated files with “…extension” e.g., sdk/dotnet/test/Azure.dotnet…sln.
Further technical details
This was working under previous SDK versions. See https://github.com/Azure/azure-sdk-for-net/tree/957a870c86b61c8f698d9915812a1575874545fa/sdk/template for the current template used in this issue.
Issue Analytics
- State:
- Created 8 months ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
c# - Get file extension with a file that has multiple periods
However I have files in my app with multiple periods. FileInfo file = new FileInfo("c:\\scene_a.scene.xml"); MessageBox.Show(file.Extension); ...
Read more >What's new in C# 9.0 - C# Guide
First, the changes to partial methods. Before C# 9.0, partial methods are private but can't specify an access modifier, have a void return,...
Read more >What's new in .NET 8
The new WithAddedModifier(IJsonTypeInfoResolver, Action<JsonTypeInfo>) extension method lets you easily introduce modifications to the ...
Read more >Should file names contain multiple periods?
Since long filenames and VFAT exist, filenames with two periods in them are perfectly valid in Windows. As far as the modern file...
Read more >fopen - Manual
If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @heaths,
I took a closer look at your template and found this part causes the mentioned error: ClientNameCapitalCase references ClientName, instead of clientName specified above.
It worked in .Net 6.0 because this ref symbol parsing wasn’t case-sensitive (.ClientName vs clientName were considered equivalent) So we strongly recommend you adjust the template to the changes in .Net 7.0 because it doesn’t work as expected now.
@dotnet/templating-engine-maintainers should this be moved to dotnet/templating for investigation? @JanKrivanek’s idea about the potential dependency ordering of a derived-and-used symbol seems a promising lead.