Using dotnet script from Windows Terminal
The first thing we'll do is install the dotnet script
tool, which is a plugin for the dotnet
command. This tool can run C# code in the terminal, and is useful for experimenting with C# syntax and libraries. We can download and install it using our dotnet
command:
dotnet tool install -g dotnet-script
Once the download and installation is complete, we can run it by executing the dotnet script
command. We can then type C# code and see the result in the terminal:
We'll be using dotnet script
later in the chapter, when we're building our REST API. To make it easier to access, we can add it to the Windows Terminal menu by modifying our settings.json
(Ctrl + Shift + ,). In this file, add the following object to the profiles
section, under the list
field. The exact value of the guid
field doesn't matter, as long as it&apos...