3. Create and Run a web app
Create a Web App
Step 1: Open the integrated terminal.
Step 2: Change to the directory (cd
) that will contain the project.
Step 3: Run the following command:
dotnet new mvc -o MvcMovie
code -r MvcMovie
If a dialog box appears with Required assets to build and debug are missing from 'MvcMovie'. Add them?, select Yes
Configure Your Web App
Step 1: Change the Port Number of your Application

Step 2: Accept the HTTPS Connection from the Terminal
Trust the HTTPS development certificate by running the following command:
.NET CLICopy
dotnet dev-certs https --trust
The preceding command doesn't work on Linux. See your Linux distribution's documentation for trusting a certificate.
The preceding command displays the following dialog, provided the certificate was not previously trusted:
Security warning dialog Select Yes if you agree to trust the development certificate.
Run the Web Application.
using the below command you can run the dotnet web app
dotnet watch

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.

Last updated