Over the years of .NET Core and modern .NET development, different handling of command names and parameters has wormed its way into the .NET CLI. In .NET 7.0, Microsoft has now standardized some things.
A list of all project templates already installed on the local system can now be obtained with:
dr Holger Schwichtenberg is Chief Technology Expert at MAXIMAGO, which offers innovation and experience-driven software development, including in highly critical safety-related areas. He is also head of the expert network www.IT-Visions.de, which supports numerous medium-sized and large companies with advice and training in the development and operation of software with 38 renowned experts.
dotnet new list
Previously the command was:
dotnet new --list
The old form still works, but results in a warning:
The same is now the case for searching for project templates on www.NuGet.org
dotnet new search
instead of
dotnet new --search
Examples of searches on NuGet
All project templates for C#:
dotnet new search --language C#
All project templates for C# from Microsoft:
dotnet new search --language C# --author Microsoft
All Blazor C# project templates from Microsoft (see Figure 2):
dotnet new search blazor --language C# --author Microsoft
Update templates
To update all installed project templates, there is now (see also Figure 3):
dotnet new update
The old syntax was:
dotnet new --update-apply
(rme)