templating icon indicating copy to clipboard operation
templating copied to clipboard

Document reserved aliases

Open GangWang01 opened this issue 2 years ago • 3 comments

Problem

#5198

Solution

Add doc for reserved aliases since .NET 7.0.

Checks:

  • [ ] Added unit tests
  • [ ] Added #nullable enable to all the modified files ?

GangWang01 avatar Sep 16 '22 08:09 GangWang01

Looks good. Let's improve this article to explain dotnetcli host file format in first place. Please let me know if you'd like to do it or I can do it.

Example of it can be found here: https://github.com/dotnet/sdk/blob/main/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/dotnetcli.host.json

It allows the following:

  • symbolsInfo: objects should match the name of parameter symbol in template.json
    • override short and long alias for parameter symbol. In case "shortName": "" it means that short alias should not be used.
    • hide parameters in CLI (isHidden property)
  • usageExamples - currently not used - https://github.com/dotnet/templating/issues/3262

Also it would be good to have unit/integration tests on it. Help tests test it in away though. We do have some unit tests here: https://github.com/dotnet/sdk/blob/main/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs

vlada-shubina avatar Sep 21 '22 12:09 vlada-shubina

I'd like to dive into host file and improve this article as well as tests.

GangWang01 avatar Sep 22 '22 03:09 GangWang01

Very nice and valuable overview! Looking forward the addition of host files parameters altering functionality

JanKrivanek avatar Sep 22 '22 16:09 JanKrivanek