Project Options
When creating new project either using Visual Studio 2022 or using the command prompt for tools like Visual Studio Code, it is useful to see a summary of your options for common types of project template.
- Console App /
console
- Class Library /
classlib
- ASP.NET Core Empty /
web
- ASP.NET Core Web App (Model-View-Controller) /
mvc
- ASP.NET Core Web API /
webapi
- ASP.NET Core Web API (native AOT) /
webapiaot
- Blazor Web App /
blazor
- JetBrains Rider options
Create a .NET 8.0 class library:
dotnet new classlib
Create a .NET Standard 2.0 class library:
dotnet new classlib --framework netstandard2.0
This project template has the same options as ASP.NET Core Empty / web
.
Warning! The .NET SDK 8 defaults to implementing services using Minimal APIs and you must use the
--use-controllers
or-controllers
switch to implement services using controllers. The .NET SDK 6 or 7 defaults to implementing services using controllers and you must use the--use-minimal-apis
or-minimal
switch to implement services using Minimal APIs. JetBrains Rider does not yet have an option to "use controllers" so you should use thedotnet new
command to create a Web API project if you need to use controllers.
This project template always implements the service using Minimal APIs and only enables http
.
All ASP.NET Core projects created from Chapter 13 onwards have a project template of ASP.NET Core Web Application and you select the Type to select between choices like Empty, Web API, or Web App (Model-View-Controller).
- In the .NET / .NET Core section...
- ...select the ASP.NET Core Web Application project template.
- And then select the Type.