Building console apps using Visual Studio Code
The goal of this section is to showcase how to build a console app using Visual Studio Code. Both the instructions and screenshots in this section are for macOS, but the same actions will work with Visual Studio Code on Windows and Linux variants.
The main differences will be native command-line actions such as deleting a file: both the command and the path are likely to be different on Windows or macOS and Linux. Luckily, the dotnet
command-line tool will be identical on all platforms.
Writing code using Visual Studio Code
Let's get started writing code!
- Start Visual Studio Code.
- On macOS, navigate to File | Open.... On Windows, navigate to File | Open Folder…. On both OSes, you can click the Open Folder button in the EXPLORER pane or click the Open folder… link on the Welcome tab, as shown in the following screenshot:
Figure 1.4: The Visual Studio Code Welcome tab
...