dotnet / dotnet/templating

Item templates should pick correct language from project

Open
#5,844 13 comments 1 reaction 0 assignees View on GitHub
area: CLI feature impeded Priority:2 triage:transfer-to-sdk triaged
Dominant language
No language data
Stars
1.7k
Forks
399
Avg merge
3d 5h
Merged PRs (30d)
39

Description

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

When using a item template inside a F# project, e.g.
`dotnet new avalonia.templatedcontrol`
I would expect that the option `-lang=F#` would not be required but it is.
So it is using the C# version by default when the `-lang=F#` was omitted/forgotten.

### Describe the solution you'd like.

The solution should be that the templating engine should detect that the item template is added to a project of a known language, when the item template has multiple matching identities with different `lang` tags the correct one should be picked.

### Additional context

Somewhat related to: #5358

Also I am aware of #2684 but I don't think that is a solution when e.g. you mostly use C# but only sometimes F#.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.