-
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
Add ability to show and choose templates that are not installed locally #1680
Comments
Please keep me posted if you add this ability to VS(Windows). I'd like to add it to VSMac at the same time if possible. |
This would be an engine feature and would apply to the CLI, so this would be a new drop of the NuGet packages |
It would be great if this was also something that can be easily used with private nuget servers. The current workflow for using private templates inside a company feels quite clunky to me. For comparison in the maven/java world the "equivalent" would be maven archetypes. There you configure an archetype repository in a central config once. This allows maven to automatically pick up all templates (aka archetypes) and versions when it comes to searching and selecting a template. No explicit local installation or updates required. No need to explicitely re-state feeds with every invocation. Having the same convenience with dotnet new would be very handy. |
We host templates on an internal NuGet feed as well. I'm not aware of a way to ensure that the most up to date template is installed aside from either browsing the NuGet repository to get the latest version and explicitly installing that ( |
It's been a while since this issue has had any comments. Are folks still interested? One of several issues in doing this is that a NuGet package may contain numerous templates. Thus, the command would have to include the package Id and the template name (maybe dropping the second if there is only one template). And we'd have to manage help for this scenario, and it would be slow. How does this relate to managing private servers? Is it just that if you are managing a private server you really want to ensure that people are using the version of the template you have on your server? Is the actual goal here to ensure users do not use an out of date template? |
Definitely still interested. The use case for sourcing from a private server are purely company internal templates for new services and libraries. The goal would be to solve both the discovery as well as the update problematic. Users currently cannot discover private templates using normal tooling and if they manually installed a template in the past they are not made aware of updated versions the next time they instantiate the template. Not installing the template and instead being able to discover the current one in the repository and instantiate it directly sounded like it could solve both of these problems. |
Checking in here - currently we
These both work off of the configured NuGet sources, so a properly-configured NuGet.config should allow for updates from private servers. The remaining request seems to be for automated or semi-automated install of a template package if instanciating a package :
This is doable for template packages that live on nuget.org, and something like this (npx-style download + run) is something I've wanted to do for a while. The gap is for having this same experience with private NuGet feeds. @vlada-shubina to support that, we'd probably have to be able to index the private feed (perhaps locally via a direct user command?) and select/merge the indexes with the larger nuget.org index? |
This issue seems to raise several points.
|
Closing in favor of #3418. Please follow this issue if you are interested in running templates that are not installed locally. |
For .NET Core 3.0, ASP.NET Core wants to ability to have templates that are never installed locally (due to various dependencies that are difficult to keep up to date) but appear as options for dotnet new and then use a cloud copy when chosen.
The text was updated successfully, but these errors were encountered: