Exploring Visual Studio Code
Development in .NET has always been associated with Visual Studio, and the pattern has been that with new versions of Visual Studio comes new versions of .NET. Visual Studio is still a good companion to developers since it has been optimized over the years to provide you with everything needed, from writing code, improving upon it, and getting it into a production environment.
As a pure text editor, it doesn't shine equally strongly. In 2015, Microsoft decided to make this better by releasing Visual Studio (VS) Code. VS Code provides syntax highlighting, the side-by-side comparison of files, and other features a good editor should have. An integrated terminal is provided, so if you are writing a script, you do not need to switch applications to execute it. In addition, it supports extensions that enable you or other developers to extend the built-in functionality. For instance, you have probably opened a JSON file only to find it slightly off with line breaks and indentation – there is an extension called Prettify JSON that fixes that.
Navigating through VS Code is mostly done on the left-hand side of windows:
As you install extensions, more icons may appear in the list. (Not all extensions have an icon.)
In the lower-left corner, you will also find the option to add accounts (for instance, an Azure account if you are using extensions leveraging Azure). See Figure 1.14, for the Visual Studio accounts icon.
In the mid to right lower pane, you can enable some console windows:
Note that you may have to enable these through the menu (View | OUTPUT/DEBUG CONSOLE/TERMINAL/PROBLEMS) the first time. These give you easy access to the running output of the application, a terminal for running command-line operations, and so on. The relevance of these depends on what type of files you are editing – for something like a JSON file, the DEBUG CONSOLE tab will not bring any features.
For the context of this book, you will want to install the C# extension:
If you work with Git repositories, you should also check out the third-party extension called GitLens, which has features useful for tracking changes in your code.
In this section, you've explored IDE environments and got familiar with the VS Code. Let's now learn how you can leverage the Windows terminal.