Introduction
In this article, we are going to discuss How to set up Visual Studio Code so that we can use C# 10 and .Net 6 with vscode.
Let’s start with installation,
STEP 1 - First lets Download and install .net 6 SDK from the official Microsoft site here.
STEP 2 - Click on the Runtime link based on your operating system.
Setup file would be downloaded in your download folder,
STEP 3 - Double click on the .exe file and complete installation.
STEP 4 - Let's check the version installed in your system using the below command.
Nice, now .net 6 SDK is installed successfully in your system. Now we will install VSCode from the Microsoft site.
STEP 5 - Install Visual studio code from here
STEP 6 - Complete installation based on your operating system.
Once completed click on the finish in the below screen.
Now we will install C#,
STEP 7 - Install C# from here
STEP 8 - Search C# and Install.
Once installed below popup appears.
STEP 9 - Another way to install C# is to search in Visual Studio Code -> Extension and install.
Once C# is installed, our environment is ready to use. Now we can create a new dotnet project using Visual Studio Code + .net 6 and C# 10.
Let’s create dotnet project,
STEP 9 - Create workspace/folder. I have created Demo folder/workspace.
STEP 10 - Open Visual Studio Code -> File -> Open Folder.
STEP 11 - Open terminal -> New Terminal.
STEP 12 - Create a new console project using the below command,
STEP 13 - Open Demo folder and check project.
STEP 14 - Check Visual Studio Code -> Demo project
STEP 15 - Double click on Demo.csproj file and check target framework.
STEP 16 - Run the Console application using the below command.
Summary
We have set up Visual Studio Code to work with C# 10 and .net 6.0. That’s all for this article. Hope you enjoy it and find it useful.
Reference :- VS code Setup
EmoticonEmoticon