Published: May 26 2020

ASP.NET Core - Setup Development Environment

This is a quick post to show how to setup an ASP.NET Core development machine.

Steps

Follow the below steps to setup an ASP.NET Core development environment and test it by downloading and running an example ASP.NET Core application.

  1. Download and Install the .NET Core SDK
  2. Download and Install Visual Studio Code
  3. Install the C# Extension for VS Code
  4. Run an example ASP.NET Core application (optional)


1. Download and Install the .NET Core SDK

The .NET Core SDK includes the .NET Core runtime and command line tools required to build and run .NET Core applications.

Download

Download the .NET Core SDK from https://www.microsoft.com/net/download/core.

Install

Install the .NET Core SDK by opening the downloaded installer and following the prompts.

Test

Test that the .NET Core SDK was installed successfully by running the command dotnet or dotnet --version.


2. Download and Install Visual Studio Code (VS Code)

VS Code is a free code editor that runs on Windows, Mac and Linux.

Download

Download VS Code from https://code.visualstudio.com/.

Install

Install Visual Studio Code by opening the downloaded setup file and following the prompts.

Test

Launch VS Code to test that it installed correctly.


3. Install the C# Extension for VS Code

The C# extension adds support to VS Code for developing .NET Core applications.

Install

Open Visual Studio Code and follow these steps to install the C# extension:

  1. Click the Extensions icon at the bottom of the left menu bar.
  2. Search for "c#" in the extensions search box.
  3. Select "C# for Visual Studio Code (powered by OmniSharp)".
  4. Install the C# extension by clicking the "Install" button.

You should see the following in output window of VS Code.

Installing C# dependencies...
Platform: win32, x86_64

Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)' (33539 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for Windows (.NET 4.6 / x64)'

Downloading package '.NET Core Debugger (Windows / x64)' (42010 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (Windows / x64)'

Downloading package 'Razor Language Server (Windows / x64)' (50835 KB).................... Done!
Installing package 'Razor Language Server (Windows / x64)'

Finished

If you receive the error The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path. Try restarting VS Code and reinstalling the C# extension, if that doesn't work see the C# extension troubleshooting page.


Run an example ASP.NET Core application (optional)

Your ASP.NET Core development environment is now setup and ready to go!

For instructions on how to download and run a simple example application in your new development environment see this post.

 


Need Some ASP.NET Core Help?

Search fiverr for freelance ASP.NET Core developers.


Follow me for updates

On Twitter or RSS.


When I'm not coding...

Me and Tina are on a motorcycle adventure around Australia.
Come along for the ride!


Comments


Supported by