How to install ASP.NET on Mac OSX

Why?

I know, I never thought the day would come where I would need to give ASP.NET a try but hey, it's 2016 and times have changed. More importantly, Microsoft has changed.

Steps

It's not hard at all to get started thanks to Homebrew and Node Package Manager

1: Install Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2: Install ASP.NET

Install aspnet with dnx, the .NET execution.runtime

brew tap aspnet/dnx

Update homebrew and make sure everything is up-to-date

brew update

Create a .NET version link to your ~/.bash_profile

echo source dnvm.sh

Install .NET version manager

brew install dnvm

Update the .NET version manager to the latest version.

dnvm upgrade

3: Install Yeoman and gulp

If you have any experience with Ruby on Rails, Sinatra, or ExpressJS, you'll likely appreciate the ability to create a scaffold. The ASP.NET team offers a generator tool.

Install Yeoman and Gulp for scaffolding.

npm install -g yo gulp

Install ASP.NET scaffolding generator.

npm install -g generator-aspnet

4: Create a new project

Run the ASP.NET generator using Gulp.

Generate an app.

yo aspnet --gulp

Run the app.

dnx . kestrel

5: Update your app

If you ever need to update npm, bower, or anything inside of project.json, run the .NET package updater.

Update your app.

dnu restore

Need an editor?

I personally still use TextMate –and Sublime Text still reigns king with Atom as close second– Microsoft's Visual Studio Code is also a good, free option.