Using dotnet new
will scaffold a new console application. To scaffold other types of projects, use the -t
or --type
flag:
dotnet new -t web
dotnet restore
dotnet run
The available templates vary by language.
console
(default) - A console application.web
- An ASP.NET Core application.lib
- A class library.xunittest
- An xUnit test project.console
(default) - A console application.lib
- A class library.