Get Started with .NET Core on Cloud9 IDE


Cloud9 IDE Logoe

For those of you not familiar. Cloud9 IDE is a web based IDE recently purchased by Amazon.

It uses the concept of per-project workspaces by allowing you to spin up a docker container as an individual workspace for each project you take on.

Cloud9 has several templates for your containers but they do not yet have support for .NET Core. This is a quick tutorial to show you how to do this.

Set up development environment

  1. Create a new workspace and choose the blank template (ubuntu Trusty at the time of writing).
  2. sudo apt update
  3. sudo apt install apt-transport-https
  4. sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
  5. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
  6. sudo apt update
  7. sudo apt-get install dotnet-dev-1.0.4

Create and run a new MVC app

  1. dotnet new mvc
  2. ASPNETCORE_URLS="https://$IP:$PORT" dotnet run

You can now preview your running app by hitting the preview button next to the run button in the menu bar.