...

/

Building Console App Using Visual Studio Code

Building Console App Using Visual Studio Code

Learn how to build a console app using Visual Studio Code and the dotnet command-line interface.

This lesson aims to showcase how to build a console app using Visual Studio Code and the dotnet command-line interface (CLI). If you never want to try Visual Studio Code or .NET Interactive Notebooks, please feel free to skip this section and the next and then continue.

The instructions and screenshots in this lesson are for Windows, but the same actions will work with Visual Studio Code on the macOS and Linux variants.

The main differences will be native command-line actions such as deleting a file: both the command and the path will likely differ on Windows or macOS and Linux. Luckily, the dotnet CLI tool is identical on all platforms.

Managing multiple projects using Visual Studio Code

Visual Studio Code has a concept named a workspace that allows us to open and manage multiple projects simultaneously. We will use a workspace to manage the two projects we create. Let’s get started writing code!

Step 1: Start Visual Studio Code.

Step 2: Make sure we have no open files, folders, or workspaces.

Step 3: Navigate to “File | Save Workspace As…” option.

Step 4: In the dialog box, navigate to our C: drive on Windows, user folder on macOS, or any directory or drive where we want to save our projects.

Step 5: Click ...