Tuesday, May 17, 2016

.NET Console application on Linux - Hello World !

I'm working on a demo to show .NET ( C# ) code on Linux. As you all know, with the new cross-plat .NET execution context DNX that also run on Linux - this should be a breeze. So - let's see what it takes to make .NET run on your Linux machine.

First of all - you need to install the .NET version manager (DNVM) on your machine, which is really simple to do:

I've put up a script on GitHub that will do all of this for you: https://github.com/jochenvw/arm_sandbox/blob/master/ubuntu-aspnetcore/ubuntu_aspnetcore.sh

Also, in this script I create a main.cs file with the 'Hello World' console command.

Indeed - this is C# in Nano on Ubuntu. Pretty cool huh? I've found Nano syntax highlighting for C# - which is probably very similair to JAVA highlighting.

Anyway - after that - you just verify that you've got a DNX installed - do a package restore with the DNX utitility tool (dnu), do a 'dnu build' and then a 'dnx run' to run your application:

I'm making this setup script work unattended with the Azure ARM CustomScript extensions so that you can one-click-deploy a Linux box with DNX installed and this application up-and-running. Then I'll make a pull request for the previously mentioned quickstart repostiory so it's even more easy to get started!


  1. whs 2011 activation key , windows 7 pro sp1 keys and download , klucz do win 7 home premium , window 7 ultimate key free genuine , home and business 2011 key free , windows 7 home basic download , free window 7 key , buy server 2013 r2 keys , luYn1y

    windows 7 ult key sale online

    buy office pro plus 2016 keys

    cheap windows 10 pro keys for sale

    windows server 2016 standard key sale and download

    buy windows 7 ult keys online

  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru Dot Net Training in Chennai. Nowadays Dot Net has tons of job opportunities on various vertical industry.
    or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.