In this tutorial, you will create a simple C# project in Visual Studio Code using the C# Dev Kit extension.
Step-by-Step Instructions#
- Download and Install Visual Studio Code (external link) if you have not done so already.
- Open Visual Studio Code.
- Install the C# Dev Kit
(external link) extension.
- Open the Extensions panel on the left sidebar.
- Search for C# Dev Kit and click Install.
- Open the File Explorer panel.
- Select Open Folder.
- Choose an existing folder or create a new one for your project.
- Open the Command Palette by pressing
Ctrl+Shift+P - Run the command
.NET: New Project.... - Select a project template, for example: Console App.
- Enter the project name.
- Press Enter to create the project in the selected folder.
- Select the solution file format:
.sln. - Press Enter to create the project.
- Open the file
Program.csfile to start coding.
After completing these steps, your project folder will contain:
Program.cs- the main file where you write your code<ProjectName>.csproj- the C# project file<SolutionName>.sln- the solution file
Visual Studio Code creates these files automatically when you create a new project.