-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable automatic install of templates on first use #3418
Comments
@satyajit-behera is your question about Visual Studio? do you want the templates to be installable in Visual Studio? Thank you. |
Thanks for the reply. Not really in visual studio. dotnet new works for installed templates. If the templates are directly installed from nuget packages or a folder available in local machine with the same command, it may help a lot in custom template scenarios and multiple version handling. |
do you mean something like this? |
Yes. Thanks. |
This would be really useful for enabling |
another idea, originally raised in #1680, is to acquire the template on first-time run from known sources (NuGet feeds from nuget.config) if not yet available. Private feeds might be supported using The challenge is on how to find the template package containing certain template by short name. For NuGet.org, this is already solved as we have search cache containing this information. But this is not available for private feeds. Possible solutions:
|
I really like this idea. It would make shipping some templates out of band easier, and also easier for people to be on the latest without having to wait for our (Visual Studio) release cycles. npx does have a very good convention for this (essentially, "install and run the thing named this"). I'm not sure if that would play nicely with the difference in template naming and nuget naming conventions in .net and nuget, but we could find some sort of metadata for the nupkg that specifies that templates are there and can be used that way. |
We already have |
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:
Justification
The text was updated successfully, but these errors were encountered: