dotnet / templating

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

Create a host symbol for host RID (or RID components) for use in templates #8307

Open baronfel opened 2 months ago

baronfel commented 2 months ago

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

Today we provide the following Host-provided symbols for binding:

We should make it easier for template authors to create per-architecture defaults/options by providing the current host RID as another symbol/bindable value.

Describe the solution you'd like.

We should provide two new symbols to allow template authors to condition code/assets/symbols/etc based on host OS and host architecture.

Additional context

No response

marcpopMSFT commented 2 months ago

I assume you are proposing Host* for these to be consistent with the existing Identifier one?

baronfel commented 2 months ago

Yeah, exactly - then if we needed an override or to change/let the user specify a different one there might be a Target* variant of those same properties.