Running ASP.NET vNext on OSX

Pre-reqs

1. Installing Mono >= 3.4.1

Sadly at the time of writing, the homebrew package is still on 3.4.0 so this means that you need to compile Mono from source:

1.1. Installation Dependencies

Firstly on Mavericks and Mountain Lion you will need to install some dependencies but this is just a simple case of installing the following homebrew packages:

1
2
3

brew install autoconf
brew install automake
brew install libtool

1.2. Make a Folder

Create a folder in the root of your user folder called .mono, i put it here because when a newer version of Mono is released as a homebrew recipe, i will hopefully remember to delete the manual install and just install it via brew instead.

1

mkdir ~/.mono

1.3. Installing Mono From Github

In the folder just created, create a file called installmono.sh and add the following into it:

3.1. Installing the Generator

3.2. Generatoring the Application

This is nothing more than running yo aspnet in the folder you want to generate the app. Then follow the options: choose weather you want a Console, Web or MVC application, enter the name of the app. I chose to generate an MVC application.

At this point if you ls you will see that the application has been generated in a subfolder and there is a NuGet.config file which will point the package manager at the ASP.NET vNext package repository.

3.3. Running the Application

To run the app, cd to the subfolder that is next to the NuGet.config and run k kestrel in your terminal, this should start the app and serve it on http://localhost:5000 by default.

Assuming all went well, you should have built yourself an ASP.NET vNext website on OSX, HUZZAAH!