templating icon indicating copy to clipboard operation
templating copied to clipboard

dotnet new details template list is missed when -version is passed

Open YuliiaKovalova opened this issue 2 years ago • 2 comments

Product

dotnet CLI (dotnet new)

Describe The Bug

Running the command with the version specified doesn't display the list of templates: dotnet new details NUnit3.DotNetNew.Template -version "1.7.0" NUnit3.DotNetNew.Template 1.7.0 | NuGet Package Explorer image

To Reproduce

Steps:

  1. run dotnet new details NUnit3.DotNetNew.Template -version "1.7.0"
  2. Observe the output No list of templates is available in the output.

dotnet Info

.net 8 preview 7

YuliiaKovalova avatar Jun 29 '23 12:06 YuliiaKovalova

On an offline discussion we agreed that we are not doing at this moment, as it is a big change on the Template Engine and how the cache works. I'll be disabling the --version option for the command while this is not implemented.

maridematte avatar Jul 04 '23 00:07 maridematte

For the case of not installed package: since we retrieve list of templates from the search cache, we can do it only for the latest version.

  • If --version matches the latest, it should be possible to show the list of templates from the search cache
  • if --version is not latest, there is no way to do that and template list should not be shown.

vlada-shubina avatar Jul 10 '23 10:07 vlada-shubina