Home » New in .NET 7.0 [12]: Unifications at dotnet new

New in .NET 7.0 [12]: Unifications at dotnet new

by admin
New in .NET 7.0 [12]: Unifications at dotnet new

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 SDK .NET 7.0 spits out a warning for the old syntax of dotnet new list (Fig. 1).

The same is now the case for searching for project templates on www.NuGet.org

dotnet new search

instead of

dotnet new --search

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

Search for project templates for Blazor from Microsoft in C# on NuGet (Fig. 2)

To update all installed project templates, there is now (see also Figure 3):

dotnet new update

The old syntax was:

dotnet new --update-apply

Updating the locally available project templates via NuGet (Fig. 3)


(rme)

To home page

See also  MSI Launches NVIDIA® GeForce RTX™ 4080, 4070 Ti GAMING TRIO WHITE Graphics Cards

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy