This procedure walks you through running a C# console program in Visual Studio Code using the terminal.
Prerequisites#
- Visual Studio Code installed with C# Dev Kit
- A C# project created in VS Code
Steps#
- Open Visual Studio Code with your project folder open.
- Open the built-in terminal with
Ctrl+\`` (Windows/Linux) orCmd+`` (Mac). You can also go to View → Terminal. - Make sure the terminal is in your project folder — you should see the folder name in the terminal prompt. If not, navigate to it with
cd folder-name. - Save any unsaved changes with
Ctrl+S(Windows/Linux) orCmd+S(Mac). - Run the program with:
dotnet runResult#
The program builds and runs. Its output appears in the terminal directly below the dotnet run command.