core linux hello world

On Asp.Net Core 1.0 you can create cross-platform applications that will run without modifications in multiple operating systems and CPU’s.

Today we are going to create an Asp.Net Core 1.0 “Hello World” sample in Windows and run it in linux (Centos 7.1 x86_64).

First we start with the installation of .Net Core 1.0.

For Windows, browse to and download the installer. After running this installer you will be able to run .Net Core applications in Windows. The project templates will also be install in Visual Studio.

For Centos 7.1, follow this guide:


Now start up Visual Studio 2015 and create a new project: visual-studio-2015-new-project

Select the “Empty” Asp.NET 5 template.visual-studio-2015-new-net-core-mvc-project

This will create a sample project that can run under IIS, IISExpress or even self-host using the Kestrel cross-platform web server.

This project creates a simple listener that responds to all requests with a simple “Hello World” string.

Running it in IISExpress and launching Chrome:


Running it in Linux:

Clone the repository:

# git clone


Restore the packages:

# cd dotnetcore-sample/src/helloworld/
# dnu restore
Microsoft .NET Development Utility Mono-x64-1.0.0-rc1-16231

Restoring packages for /dotnetcore-sample/src/helloworld/project.json
Writing lock file /dotnetcore-sample/src/helloworld/project.lock.json
Restore complete, 1343ms elapsed

Feeds used:


Start the project using the self-hosting web server:

# dnx web

Hosting environment: Production
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.


Browse the website:

# curl http://localhost:5000
Hello World


You can the sample repository at:

With this sample you can try out a simple core linux project.