Getting Started with ASP.NET Core

Learn how to build your first ASP.NET Core web app with step‑by‑step instructions, code snippets, and live previews.

Jump to Prerequisites

Prerequisites

1. Create a New Project

dotnet new webapp -o MyFirstApp
cd MyFirstApp
dotnet run
1. Open Visual Studio → Create a new project.
2. Choose “ASP.NET Core Web App (Model‑View‑Controller)”.
3. Name it “MyFirstApp” and click Create.
4. Press F5 to run.

2. Explore the Project Structure

.
├─ Controllers
│   └─ HomeController.cs
├─ Views
│   ├─ Home
│   │   └─ Index.cshtml
│   └─ Shared
│       └─ _Layout.cshtml
├─ wwwroot
│   └─ css/site.css
├─ Program.cs
└─ MyFirstApp.csproj

3. Run and Test

Open http://localhost:5000 in your browser. You should see the default welcome page.

Next Steps