templating
templating copied to clipboard
dotnet new details template list is missed when -version is passed
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
To Reproduce
Steps:
- run
dotnet new details NUnit3.DotNetNew.Template -version "1.7.0" - Observe the output No list of templates is available in the output.
dotnet Info
.net 8 preview 7
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.
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
--versionmatches the latest, it should be possible to show the list of templates from the search cache - if
--versionis not latest, there is no way to do that and template list should not be shown.