Featured Article

Create ASP NET Core Web Application in Visual Studio Code Quickly

Kenneth Jul 13, 2026

Embarking on your journey to develop an ASP.NET Core web application? Great! Visual Studio Code (VSCode), Microsoft's lightweight yet powerful code editor, is an excellent choice for this task. Let's explore how to create an ASP.NET Core web application using VSCode, step by step.

Tutorial: Create a more complex data model for an ASP.NET MVC app
Tutorial: Create a more complex data model for an ASP.NET MVC app

Before we dive into the development process, ensure you have the following prerequisites: Visual Studio Code installed, .NET Core SDK, and a working understanding of C# and HTML. If you're new to these technologies, fret not! This guide will walk you through.

A Guide for Building Angular SPA with ASP.NET Core 5 Web API
A Guide for Building Angular SPA with ASP.NET Core 5 Web API

Setting Up Your Environment and Project

Let's set up your development environment and create a new ASP.NET Core project.

How to Create and Deploy ASP.NET Core 2.0 Web Application with ASP.NET Razor Pages - CrowdReviews.com Blog
How to Create and Deploy ASP.NET Core 2.0 Web Application with ASP.NET Razor Pages - CrowdReviews.com Blog

Open Visual Studio Code, then click on the Extensions tab (or press Ctrl + Shift + X). Search for and install the following extensions:

  • C# for Visual Studio Code (powered by Microsoft)
  • ASP.NET Core Helper
A Gentle Introduction To ASP.NET  For Beginners
A Gentle Introduction To ASP.NET For Beginners

Installing the .NET Core SDK

The .NET Core SDK is required to create new .NET Core projects and restore packages. Visit the official Microsoft site to download and install the SDK.

Once installed, open a new terminal in VSCode (View > Terminal or Ctrl + `), then type 'dotnet --version' to verify the installation.

ASP.NET Core full CRUD with .NET 5 | MSSQL/MySQL | EF code first
ASP.NET Core full CRUD with .NET 5 | MSSQL/MySQL | EF code first

Creating a New ASP.NET Core Project

Now, create a new .NET Core project. In the terminal, navigate to the directory where you want to create your project, then run:

dotnet new web -o MyWebApp

This command creates a new ASP.NET Core MVC web application named 'MyWebApp'.

Docker compose with ASP.NET Core, EF Core and the PostgreSQL image
Docker compose with ASP.NET Core, EF Core and the PostgreSQL image

Exploring Your New Project

Navigate to your project folder ('cd MyWebApp') and open it in VSCode ('code .'). Familiarize yourself with the project's structure:

Complete guide to building an app with .Net Core and React
Complete guide to building an app with .Net Core and React
Ultimate Guide: API Versioning in ASP.NET Core
Ultimate Guide: API Versioning in ASP.NET Core
17 Beginner C# Walkthrough Projects step by step
17 Beginner C# Walkthrough Projects step by step
Post by @im-a-developer · 1 image
Post by @im-a-developer · 1 image
the book cover for c 10 and net 6 modern cross - platform development by mark price
the book cover for c 10 and net 6 modern cross - platform development by mark price
Bhavya Technologies
Bhavya Technologies
.NET Core Tools 1.0 Release Announcement
.NET Core Tools 1.0 Release Announcement
Ways to Access Quick Assist Administrator Mode
Ways to Access Quick Assist Administrator Mode

MyWebApp/
- MyWebApp.csproj - The project file
- wwwroot/ - Static files like CSS, JavaScript, and images
- Controllers/ - Controllers manage the application's behaviour
- Models/ - Data models representing the data in your app
- Views/ - Razor views defining the app's UI

Running Your Application

To run your application, press F5 or click the green 'Play' arrow in the top-right. VSCode will build, restore packages, and run your app on a local server. Open your browser and navigate to http://localhost:5001 to view your ASP.NET Core web application.

Explore the app's themes, navigate through the pages, and click around. For now, it's just the default template. Later, you'll customize it to your liking.

Adding a New Page

Let's add a new Razor view to create a simple 'About' page. Right-click on the 'Views' folder, select 'New File', name it 'About.cshtml', and add the following code:

@{
    ViewData["Title"] = "About";
}

About

@ViewData["Message"]

Then, add an 'About' link to Views/Home/Index.cshtml:

About

Now, run your application again. You'll see a new 'About' link. Clicking it takes you to your new 'About' page.

Conclusion

Congratulations! You've successfully created an ASP.NET Core web application using Visual Studio Code. This is just the beginning. ASP.NET Core's extensive ecosystem and visual richness make it an ideal choice for web development. Next, explore styling, routing, data access, and more advanced aspects of ASP.NET Core. Happy coding!