aspnetcore/tutorials/razor-pages/razor-pages-start/includes/razor-pages-start5.md
:::moniker range=">= aspnetcore-5.0 < aspnetcore-6.0"
This is the first tutorial of a series that teaches the basics of building an ASP.NET Core Razor Pages web app.
For a more advanced introduction aimed at developers who are familiar with controllers and views, see Introduction to Razor Pages.
[!INCLUDE Choose web UI]
At the end of the series, you'll have an app that manages a database of movies.
In this tutorial, you:
[!div class="checklist"]
- Create a Razor Pages web app.
- Run the app.
- Examine the project files.
At the end of this tutorial, you'll have a working Razor Pages web app that you'll enhance in later tutorials.
Start Visual Studio and select Create a new project. For more information, see Create a new project in Visual Studio.
In the Create a new project dialog, select ASP.NET Core Web Application, and then select Next.
In the Configure your new project dialog, enter RazorPagesMovie for Project name. It's important to name the project RazorPagesMovie, including matching the capitalization, so the namespaces will match when you copy and paste example code.
Select Create.
In the Create a new ASP.NET Core web application dialog, select:
The following starter project is created:
The tutorial assumes familiarity with VS Code. For more information, see Getting started with VS Code.
Select New Terminal from the Terminal menu to open the integrated terminal.
Change to the directory (cd) that will contain the project.
Run the following commands:
dotnet new webapp -o RazorPagesMovie
code -r RazorPagesMovie
The dotnet new command creates a new Razor Pages project in the RazorPagesMovie folder.
The code command opens the RazorPagesMovie project folder in the current instance of Visual Studio Code.
In the Configure the new Web Application dialog:
Name the project RazorPagesMovie and select Create.
Here's an overview of the main project folders and files that you'll work with in later tutorials.
Contains Razor pages and supporting files. Each Razor page is a pair of files:
.cshtml file that has HTML markup with C# code using Razor syntax..cshtml.cs file that has C# code that handles page events.Supporting files have names that begin with an underscore. For example, the _Layout.cshtml file configures UI elements common to all pages. This file sets up the navigation menu at the top of the page and the copyright notice at the bottom of the page. For more information, see xref:mvc/views/layout.
Contains static assets, like HTML files, JavaScript files, and CSS files. For more information, see xref:fundamentals/static-files.
appsettings.jsonContains configuration data, like connection strings. For more information, see xref:fundamentals/configuration/index.
Contains the entry point for the app. For more information, see xref:fundamentals/host/generic-host.
Contains code that configures app behavior. For more information, see xref:fundamentals/startup.
If you run into a problem you can't resolve, compare your code to the completed project. View or download completed project (how to download).
[!div class="step-by-step"] Next: Add a model
:::moniker-end