Skip to content

Enable automatic install of templates on first use #3418

Open

Description

Was thinking, it would enable a lot of ease and usage if the templates can be used without installing it using dotnet new. Can we just use those templates directly from the nugets or a folder to create those items derived from the templates. It may be available now, not sure, but I could not see any available solution for the same.


Audience: dotnet CLI users

Background

Now to instantiate any template you need to install the package containing it first.
The packages are not updated automatically, and it's user responsibility to keep the up-to-date. To check updates the user needs to use update command or will be prompted only after outdated template is created.
In many cases, when acquiring new template, it would be beneficial to try it first to see if it matches your needs.
Now it is a 3 step process:

  • install the template package
  • instantiate the template
  • uninstall the template package

Justification

  • even better experience for CLI users
    • easy option to "try it out" before installing the package
    • avoid running outdated templates - always use latest from the source
  • popular tools like npx has this experience
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasearea: CLIRelated to dotnet new CLI (usually dotnet/TemplateEngine.CLI source code)featureThe issue defines new feature.gathering-feedbackThe issue requires feedback in order to be planned, please comment if the feature is useful for youtriagedThe issue was evaluated by the triage team, placed on correct area, next action defined.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions