Using .NET Core in Visual Studio Code

.NET Core provides a fast and modular platform for creating server apps that run on Windows, Linux, and macOS. Use Visual Studio Code with the C# extension to get a powerful editing experience with C# IntelliSense (smart code completion) and debugging.

Prerequisites

Install the following:

Create a "Hello World" app

  1. Initialize a C# project:

    • Open a terminal and navigate to the folder in which you'd like to create the app.
    • Enter the following command in the command shell:
      dotnet new console
    
  2. When the project folder is first opened in VS Code:

    • A "Would you like to add the required assets to build and debug your project?" notification appears at the top of the window.
    • Select Yes.
  3. Run the app by entering the following command in the command shell:

     dotnet run
    

Watch a video tutorial for further setup help on Windows, macOS, or Linux.

Next steps