aspnetcore/tutorials/first-mvc-app/start-mvc/includes/start-mvc3.md
:::moniker range="= aspnetcore-3.1"
[!INCLUDE consider RP]
This is the first tutorial of a series that teaches ASP.NET Core MVC web development with controllers and views.
At the end of the series, you'll have an app that manages and displays movie data. You learn how to:
[!div class="checklist"]
- Create a web app.
- Add and scaffold a model.
- Work with a database.
- Add search and validation.
View or download sample code (how to download).
From the Visual Studio, select Create a new project.
Select ASP.NET Core Web Application > Next.
Name the project MvcMovie and select Create. It's important to name the project MvcMovie so when you copy code, the namespace will match.
Select Web Application(Model-View-Controller). From the dropdown boxes, select .NET Core and ASP.NET Core 3.1, then select Create.
Visual Studio used the default project template for the created MVC project. The created project:
The tutorial assumes familiarity with VS Code. For more information, see Getting started with VS Code and Visual Studio Code help.
Open the integrated terminal.
Change directories (cd) to a folder that will contain the project.
Run the following command:
dotnet new mvc -o MvcMovie
code -r MvcMovie
A dialog box appears with Required assets to build and debug are missing from 'MvcMovie'. Add them?, select Yes.
dotnet new mvc -o MvcMovie: Creates a new ASP.NET Core MVC project in the MvcMovie folder.
code -r MvcMovie: Loads the MvcMovie.csproj project file in Visual Studio Code.
Select File > New Solution.
In Visual Studio for Mac earlier than version 8.6, select .NET Core > App > Web Application (Model-View-Controller) > Next. In version 8.6 or later, select Web and Console > App > Web Application (Model-View-Controller) > Next.
In the Configure your new Web Application dialog:
Name the project MvcMovie, and then select Create.
Select Ctrl+F5 to run the app without debugging.
Visual Studio:
The address bar shows localhost:port# and not something like example.com. The standard hostname for your local computer is localhost. When Visual Studio creates a web project, a random port is used for the web server.
Launching the app without debugging by selecting Ctrl+F5 allows you to:
You can launch the app in debug or non-debug mode from the Debug menu item:
You can debug the app by selecting the IIS Express button
The following image shows the app:
Select Ctrl+F5 to run the app without debugging.
Visual Studio Code:
https://localhost:5001.The address bar shows localhost:port:5001 and not something like example.com. The standard hostname for your local computer is localhost. Localhost only serves web requests from the local computer.
Launching the app without debugging by selecting Ctrl+F5 allows you to:
Make code changes.
Save the file.
Quickly refresh the browser and see the code changes.
Select Run > Start Without Debugging to launch the app.
Visual Studio for Mac: starts Kestrel server, launches a browser, and navigates to http://localhost:port, where port is a randomly chosen port number.
The address bar shows localhost:port# and not something like example.com. The standard hostname for your local computer is localhost. When Visual Studio creates a web project, a random port is used for the web server. When you run the app, you'll see a different port number.
You can launch the app in debug or non-debug mode from the Run menu.
The following image shows the app:
In the next part of this tutorial, you learn about MVC and start writing some code.
[!div class="step-by-step"] Next
:::moniker-end