Hello World with .NET Core


.NET Core is Microsoft’s new cross-platform Command Language Runtime (CLR). This post is an elementary getting started guide where I create, build and run a “Hello World!” console application with .NET Core.

Let’s begin by downloading and installing .NET Core for your platform. To create a new console applications run

dotnet new

That will create two files – project.json and Program.cs. Edit Program.cs using your favorite editor.

I recommend using the multi-platform VS Code. You can extend the capabilities of VS Code by downloading extensions from the VisualStudio Marketplace. VS Code should prompt you to download the C# extension when you open Program.cs.

To build the new program from the command line run

dotnet build

To execute the program run

dotnet run

You can also edit, and run or debug the program using VS Code, as shown in this screenshot

.NET CLR with VS Code

Console applications can be very powerful, but .NET CLR can also be used to build Web applications using ASP.NET Core.

One thought on “Hello World with .NET Core

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s