Create a new .NET MVC project starter (with the CLI)

Generate a DotNet MVC Starter Project with CLI - A Step-by-Step Guide. Learn to create a webapp and test packages with .NET Core. Get started now!

ASP.NET Core Empty                            web             [C#],F#     Web/Empty

ASP.NET Core gRPC Service grpc [C#] Web/gRPC ASP.NET Core Web API webapi [C#],F# Web/WebAPI ASP.NET Core Web App webapp,razor [C#] Web/MVC/Razor Pages ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC


## Choose a template type
We will create a new webapp which support HTML view rendering and MVC controllers. 

dotnet new webapp -o my-project The template "ASP.NET Core Web App" was created successfully. This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/6.0-third-party-notices for details.

Processing post-creation actions... Running 'dotnet restore' on /root/my-project/my-project.csproj... Determining projects to restore... Restored /root/my-project/my-project.csproj (in 60 ms). Restore succeeded.


## Creating tests using the CLI
We can create test packages for xUnit, MSTest and NUnit using the command line:

dotnet new xunit -o test --name test The template "xUnit Test Project" was created successfully.

Processing post-creation actions... Running 'dotnet restore' on /root/ms2-sms-ingest/test/test.csproj... Determining projects to restore... Restored /root/ms2-sms-ingest/test/test.csproj (in 298 ms). Restore succeeded.