Skip to content

Instantly share code, notes, and snippets.

@raisanen
Last active October 1, 2019 08:58
Show Gist options
  • Save raisanen/57db5ed5a95b35db4afc0b4c566efd87 to your computer and use it in GitHub Desktop.
Save raisanen/57db5ed5a95b35db4afc0b4c566efd87 to your computer and use it in GitHub Desktop.
C#-development with VisualStudio Code - Quickstart guide

Getting started with C# development using Visual Studio Code

This is a quick guide for getting started with Visual Studio Code and C# development.

Prerequisites

Install the following:

Creating and running a project

Create a new project

Open a shell (CMD, PowerShell, &c) and execute the following:

> dotnet new console -o TestApp
> code TestApp

This should create a new ConsoleApp and open it in VSCode.

Run your project

In Visual Studio Code, open a new Terminal (View => Terminal in the menu). Execute the following command:

> dotnet run

This should run the project, outputing Hello World!.

Troubleshooting

If the code is filled with red squiggly lines

Open the command palette in VS Code (Ctrl+Shift+P) and search for OmniSharp: Restart OmniSharp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment