Complete VS Code Set up for .NET and C# Programming


Visual Studio Code is one of the most popular code editors among developers today. Itβs customizable, lightweight, and familiar to many programmers. My opinion is that VS Code is an excellent choice for coding C# and .NET
In this article, Iβll walk you through how I set up my VS Code environment for .NET and C# coding ππ.
1) Download and Install VS Code β¬οΈ:
Link π: https://code.visualstudio.com/download
After downloading the VS Code setup from the above link, you can easily install it directly.
2) Install relevant extensions for .NET and C# β¬οΈ :
Open VS Code on your PC or laptop and navigate to the extensions section using the sidebar. At the top of the extensions search for below names
C# Dev kit: helps you manage your code with a solution explorer and enhance your C# environment
Intellicode for C# Dev kit: provides AI-assisted development features for C#
Check whether it automatically installs .NET install Tools and C# for Visual Studio Code extensions.
If these are okay, youβre ready to go. πββοΈ
3) Download and install .NET SDK β¬οΈ:
Download the .NET SDK that matches to user device OS and install it.
Link π: https://dotnet.microsoft.com/en-us/download/dotnet/9.0
Check whether .NET is installed on your PC correctly.
STEP-1: Open the command prompt on your pc
STEP-2: Type
dotnet βversion
STEP-3: Press Enter
If itβs showing the version, Congratulations! π₯³ .NET has been correctly installed on your system.
4) Create a console project π:
STEP-1: Create a new folder on your pc where you want
STEP-2: Open VS Code on that folder location
STEP-3: Open a new terminal on VS Code by clicking
Ctrl + Shift + `
or using the top barSTEP-4: Enter the code below on your terminal
dotnet new console -o ./projectName
Now youβre ready to go. πββοΈ
5) Write the first code π§βπ»:
Now you can see the file structure of the project. Open Program.cs file and type whatever C# code you want.
6) Run C# Code π:
You can run your code using the VS Code run button that shows at the top of the file, or simply by typing dotnet run
In your terminal.
Thank you for reading π§ π
Congratulations!π₯³ Now you are completely ready for code C# on your VS Code. Happy Coding!
Best regards!
Chathush-Vishmika
Subscribe to my newsletter
Read articles from Chathush Vishmika directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Chathush Vishmika
Chathush Vishmika
Sharing my journey as I learn web development from scratch. Writing to learn, grow, and help other beginners along the way. π¨βπ»π