Menu

ASP.Net Core on Cloud9

14th August 2016 - dotnetcore

This is going to be the first of a series of .Net Core posts, seeing as they’ve started to stabilise with all the name things and things..

With Cloud9IDE being purchased recently by Amazon, it seems that Amazon may have great, Heroku flavoured, plans. These plans will probably revolve around micro-site / micro-service development, which is something asp.net core hopes to be at the vanguard of.

Installing .net core on Cloud9 is simply installing it on Ubuntu 14, which at the time of writing is the current LTS version of Ubuntu. When cloud9 moves to Ubuntu 16, I can’t imagine the process outlined below to be any different, apart from the repo change.

Firstly, log into Cloud9, and create a new Ubuntu Workspace.

At the command prompt, update the apt library;

  sudo apt-get update

then add the capability for apt to get resources from https.

  sudo apt-get install apt-transport-https

Now, follow the instructions on the .net core page ( https://www.microsoft.com/net/core#ubuntu )

Note: The instructions that follow are correct at time of writing, please check with the official page also.

  sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'

  sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893

  sudo apt-get update

  sudo apt-get install dotnet-dev-1.0.0-preview2-003121

Once installed, create a new folder, create a new app, restore the packages and run it.

ala

  mkdir helloworld

  cd helloworld

  dotnet new

  dotnet restore

  dotnet run

.Net core is a leap forward into the unknown for Microsoft, and they hope that they get the jump on the incoming micro-web technologies. They have a steep hill to climb to get to the node ecosystem, but it also has its weaknesses. So, good luck Redmond. 🙂