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. But 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.

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.

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.

Was this article helpful?

Leave a Comment