Enterprise Framework

Software Solutions in the Enterprise

How To : ASP.NET vNext : Step by Step Setup on Mac and console app

ASP.NET vNext Step by Step setup on Mac and console app

I have put together a sequence of continuous steps for running vNext on your Mac

  1. Open Terminal
  2. Install Ruby
  3. Install Homebrew by running:
    1. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    2. brew install wget
  4. Run the brew command to tap the ASP.NET vNext related git repositories
    1. brew tap aspnet/k
    2. To delete the previous tap commands
      1. brew untap aspnet/k
  5. Run install for KVM to install the latest KRE package
    1. brew install kvm
  6. Run the following if kvm is not recognized by terminal
    1. source kvm.sh
  7. Switch directories.  Replace {username} with your username.
    1. cd /users/{username}/Documents
  8. Make a new directory
    1. mkdir C#
    2. cd C#
  9. Use vi to create a new file called Program.cs
    1. vi Program.cs
    2. :i
    3. using System;

      public class Program
      {
      public static void Main()
      {
      Console.WriteLine("Hello World");
      }
      }
    4. press ESC
    5. :w
    6. press ESC
    7. :q!
  10. Use vi to create a new file called project.json
    1. vi project.json
    2. :i
    3. {
      "dependencies": {

      },
      "frameworks": {
      "aspnet50": {},
      "aspnetcore50": {
      "dependencies": {
      "System.Console": “4.0.0-beta-*”
      }
      }
      }
      }
    4. press ESC
    5. :w
    6. press ESC
    7. :q!
  11. Run the kpm restore command.
    1. kpm restore
  12. Run the program
    1. k run
References:

vNext home page is http://www.asp.net/vnext

vNext Source code is https://github.com/aspnet/home

vNext Wiki is https://github.com/aspnet/Home/wiki


Comments are closed