ASP.NET MVC

Running Asp.NET vNext on a Mac


I am preparing for a talk I am about to give very soon (more to follow), and I wanted to demo some of the new features of ASP.NET MVC 6 on a Mac. It took reading instructions on multiple sites to get this to work, so I wanted to write it down in one place. Hopefully, this can help someone save a little bit of time. The only thing that is assumed to already be installed is npm.

1. We start with installing brew, by running: (instructions here)

2. Next, we need to install the command line tools for vNext. Details are available on this link:

and in case your terminal won’t understand kvm (and it probably won’t on the first run), type

3. Install the package manager in Sublime (this page has more details) by opening it’s console (View – Console) and pasting in the following code:

4. Install the Sublime add-on, Kulture, by pressing  Cmd + Shift + P  and selecting Package Control: Install Package , then finding Kulture

5. Scaffold a project by opening a terminal window, and typing:

then, create the actual project:

6. Open the project

Sublime Text 3 MVC7. Grab the NuGet packages – we just scaffolded the project, now we need the NuGet files, so first, bring up the Command Palette again, by pressing Cmd + Shift + P, then select “K commands” and type  kpm restore .

KPM Restore

8. To build the project, I had to select the type of build manually. Automatic detection didn’t work. Then, I pressed  Cmd + B .

Screen Shot 2014-11-06 at 17.12.02

 

9. Finally, open the Command palette again, by pressing Cmd + Shift + P , select Run K commands, and run  K kestrel . Be wary of the port number, then, open your favourite browser and behold the beauty that is a MVC page on a Mac OS X.

ASP.NET MVC on a Mac OS X


Anže Vodovnik is a proud father, enthusiastic guitarist and passionate software developer. He enjoys presenting at conferences sharing his experience of over 15 years of creating software. He was briefly a Microsoft MVP for Azure before forfeiting the title when he joined Microsoft UK, where he’s now working hand-in-hand with customers to help them develop and use solutions based on the Microsoft Azure platform.

View Comments