question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow share template name for different languages

See original GitHub issue

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

I writing templates for F* language which provide exporting to F#. I want make consuming F* programs in .NET ecosystem to be as easy as possible. So I create template https://github.com/kant2002/fstarmsbuildsdk and by mistake do not change short template for template, but do change

  1. Package identity
  2. Language

Currently when I run dotnet new console --lang F* I receive following error message

Unable to resolve the template, the following installed templates are conflicting:
Identity                  Template Name  Short Name  Language  Author         Package

------------------------  -------------  ----------  --------  -------------  --------------------------------------------
FStarLang.Common.Console  Console App    console     F*        Andrii Kur...  FStarLang.DotNet.Common.ProjectTemplates.1.0
Microsoft.Common.Console  Console App    console     C#,F#,VB  Microsoft


Uninstall the template packages containing the templates to keep only one template from the list or add the template options which differentiate the template to run.

Describe the solution you’d like

Would be good that package resolution would take into account switch --lang here and resolve template not only on short name, but on short name + language.

Additional context

Other languages which may benefit from this

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:7
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
baronfelcommented, Oct 3, 2022

@phenning this new template would be for F-Star, a proof language that is distinct from F# 😃

1reaction
vlada-shubinacommented, Oct 4, 2022

Moving the issue to dotnet/templating for the planning purposes.

Short time solution - workaround It is already possible to achieve the desired behavior, though a bit odd. The solution is to use the same groupIdentity as Microsoft template: here Microsoft.Common.Console. It makes the template appear in the same line/group in dotnet new. You can check https://www.nuget.org/packages/Peachpie.Templates - they are already doing that. @phenning please let us know if there are any concerns for Visual Studio here.

Medium time solution

Long time solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-language Content
It also allows for unique content to be used across pages which share a template. Include field translations in custom modules and themes....
Read more >
how to add different base templates for different languages ...
I have a page and against that page i have different templates in each language and i just need to load them on...
Read more >
email - Sendgrid: use template versions to support multiple ...
So, for example I have template with 2 version: English(active) and Russian. Thus, if I want to send email with Russian version, I...
Read more >
Email Template Languages
In order to enable a new language for your site, navigate to Configuration > Email Templates > Configure Languages. On this page you...
Read more >
Multi language template
Hi, I am creating a template for a specific kind of article. Our confluence guidelines are set to create every article in German...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found