How to Create a .NET Core Project in Visual Studio Code

.NET Core is an open-source, cross-platform framework provided by Microsoft, used to develop web applications and Windows native applications. .NET Core can run on any OS like Windows, Linux, or Mac as a cross-platform framework.

However, this could result in varying development experiences. To solve this problem, Microsoft introduced VS Code. VS Code brings consistency in .NET Core development on Windows, Linux, and Mac. This guide will show you how to create a .NET Core Project in Visual Studio Code.

Step 1: Download .NET Core SDK

Download and install .NET Core SDK from dotnet.microsoft.com/download with default configurations.

Download .Net SDK
Download Dotnet Core from dotnet.microsoft.com/download. Install it with default configurations.

Step 2: Create a .NET Core project

After installing the .NET Core SDK, follow the steps below to create a .NET Core project in VS Code:

  1. Select the Open Folder button from the “Explorer” pane in VS Code.

    Open Folder
    From the Explorers tab on the sidebar, select Open Folder.

  2. Create a folder in your preferred directory to store your programs. For example, I will choose “Test.”

    Folder Directory
    Open the folder from the preferred directory.

  3. From the top-level View menu, select Terminal. Alternatively, you can press Ctrl + ` on your keyboard.

    Terminal
    Select View menu and then choose Terminal.

  4. To create a new .NET Core project, run the following command in the Terminal:
    dotnet new mvc

    Command
    In the console, enter this command and hit Enter: dotnet new mvc.

  5. You will notice multiple files inside your folder in the Explorer pane. These files will have a simple template to let you start working on your .NET Core project.
.Net Core Project
You will find the .NET Core project with templates on the Explorer pane.

Leave a Comment