[Update] .Net Core 2 on Cloud9

2nd December 2017 - c#, Development, dotnetcore, linux, nodejs, server

Its been over a year since my last post, and since then dotnetcore has gone to version 2.0, and amazon has expanded the reach of cloud9 to be its defacto ide for lambda and AWS management.

However, I sort of covered cloud functions in a previous post, and I will be revisiting it later, so we’re not going to cover that here. Just a cut down version of my previous post, but targeting aspnet core 2.0.

Cloud9 runs ubuntu in a container in the AWS cloud. With this knowledge its pretty simple to set it up.

So, in the project set up page in Cloud9, select the Ubuntu workspace.

As soon as the container is set up, update Ubuntu and install the https transports

sudo apt-get update 
sudo apt-get install apt-transport-https

Then install dotnetcore

curl | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

sudo sh -c 'echo "deb [arch=amd64] trusty main" > /etc/apt/sources.list.d/dotnetdev.list'

sudo apt-get update 
sudo apt-get install dotnet-sdk-2.0.2

Then you can either create a baseline .net project, or roll your own.

Open up a new console to start

dotnet new console -o someWeather

Remember, only ports 8080 and 8081 are usually open, so keep any requests on those ports.

Bye for now


Leave a Reply