.NET Tutorial - Hello World in 5 minutes

Create your app

  1. Open the command palette in VS Code by pressing CTRL+SHIFT+P.
  2. Open the command palette in VS Code by pressing CMD+SHIFT+P.
  3. Type .NET: to see the commands you can run with C# Dev Kit!
  4. Find and select .NET: New Project to create a new .NET project.
  5. Scroll down and select Console App.
  6. Choose the folder location you'd like to save your project.
  7. Name the project MyConsoleApp in the command palette when prompted.

If asked, enable Workspace Trust by checking the box and selecting Yes, I trust the authors.

Workspace trust dialog

Note: While sign in isn't required or enforced by the extension, you might need to sign in using your Visual Studio account to comply with the EULA requirements for the C# Dev Kit extension.

In the VS Code Side Bar, make sure the Explorer is open. Click on the MyConsoleApp folder to make sure it is expanded.

My console app in explorer sidebar

The main file in the MyConsoleApp folder is called Program.cs. By default, it already contains the necessary code to write Hello, World! to the terminal. Click on the file to see the code created by the template:

Program cs in solution explorer

Select the Continue button below to go to the next step.

Got an error?

If you can't resolve the issue you're having, select the I ran into an issue button below to get help fixing the problem.

Continue