我安装了一系列用于
的dotnet模板dotnet new
使用cli选项,例如
dotnet new -i Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0
或
dotnet new -i Microsoft.DotNet.Web.Spa.ProjectTemplates::*
如此处所述Available-templates-for-dotnet-new
如何列出我安装的模板版本?
的输出dotnet new
不显示模板的当前版本
╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ Templates Short Name Language Tags ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║ ---------------------------------------------------------------------------------------------------------------- ║
║ Console Application console [C#], F#, VB Common/Console ║
║ Class library classlib [C#], F#, VB Common/Library ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
答案 0 :(得分:5)
我认为最好的是查看
C:\Users\BozoJoe\.templateengine\dotnetcli\v2.1.104\packages
其中包含文件名中的版本号的nupkgs(以及nupkg拉链)
答案 1 :(得分:2)
有两种获取模板版本的方法。
拳头,您可以使用已记录的command
dotnet new -u
第二,您可以使用以下命令:
dotnet new --debug:showconfig
它将显示所有已安装的模板及其版本号。