Before configuring Visual Studio Code, the .NET Core SDK must be present on your system. If you haven’t installed it yet, follow the steps described here.

If you have successfully installed .NET Core SDK, open Visual Studio Code, and choose the theme you want (Figure 1). Then, click on the “Mark Done” button.

Figure 1 Choosing the look you want

Click on the “Extensions” button in the Activity Bar on the left. In the Side Bar that opens, search for “C# Dev Kit” developed by Microsoft (as shown in Figure 2), click on the “Install” button and wait for the installation to complete.

Figure 2 Searching for the C# Dev Kit extension in Visual Studio Code

Next, you must add a folder to the workspace. Click on the “Explorer” button in the Activity Bar on the left. In the Side Bar that opens, click on the “Open Folder” button, as shown in Figure 3.

Figure 3 Adding a folder to the workspace

Open (select) an empty folder where your projects should be stored. If a popup window opens asking you if you trust the authors of this folder, you should click on the “Yes, I trust the authors” button.

Notice: It is a good idea to create a folder named “VS Code CS Projects” in your Documents folder and add that folder to the workspace.

Next, hit the CTRL + SHIFT + P key combination to open the Command Palette, and run the “.NET: New Project…” command, as shown in Figure 4.

Figure 4 Creating a new C# project

This step will force Visual Studio Code to install some extra packages and activate C#, C# Dev Kit and C# IntelliCode as shown in Figure 5.

Figure 5 Installing extra packages and activating C#, C# Dev Kit and C# IntelliCode

Now, you need to set which console the target program should be launched into. From the main menu, click on File → Preferences → Settings. Search for the keyword “CSharp”. Select “Debugger” on the left, as shown in Figure 6, and set the field “Debug: Console” to “integratedTerminal”.

Figure 6 Changing which console the target program should be launched into.

One thing that I do in my books in order to save paper is to decrease the number of spaces per indent to two. From the main menu, click on File → Preferences → Settings. Search for the keyword “Tab”. Select “Text Editor” on the left, as shown in Figure 7, and set the field “Editor: Tab Size” to 2.

Figure 7 Changing tab size

Visual Studio Code has been configured properly! Now it’s time to conquer the world of C#!