dotnet / templating

This repo contains the Template Engine which is used by dotnet new
https://docs.microsoft.com/dotnet/
MIT License
1.63k stars 369 forks source link

Consider providing the current context path of "dotnet new" as a bound symbol #7471

Open egvijayanand opened 9 months ago

egvijayanand commented 9 months ago

Is your feature request related to a problem? Please describe.

Consider providing the current context path of "dotnet new" as a bound symbol.

This is necessary for certain evaluations like relative path.

Describe the solution you'd like.

A bound symbol, similar to bind:HostIdentifier.

Additional context

CLI templating symbols that are defined in the file template.json.

baronfel commented 9 months ago

This makes perfect sense to me -would you be interested in adding this bound symbol?

egvijayanand commented 9 months ago

@baronfel Have added a PR for this. Hope this is the necessary change.

Kindly let me know your feedback.

baronfel commented 5 months ago

Closing as #7472 has been merged. Thank you @egvijayanand, and sorry about the delay!

egvijayanand commented 3 months ago

@baronfel I have confirmed that the bind symbol is now included in .NET 9 Preview 6. However, the Wiki has not been updated yet. Hopefully, this will be addressed in the next preview.

Thank you for your kind cooperation.

Is there an option to backport this feature to .NET 8, an LTS release? This would benefit many users, as it’s a straightforward property and should not pose any issues.