Git Product home page Git Product logo

aspnetvnextonmac's Introduction

AspNETvNextonMac

This page has been updated to reflect the changes made from vNext Alpha to Beta

To get started you will need the following software ,frameworks and package managers :

Before you get started installing the frameworks and PKGs you need to get ASP.NET vNext running, make sure that you have the latest version for Node and npm. Copy and paste the code below into terminal.
 node --version && npm --version
Check to see if you have git installed as well .
git --version

 Install Yeoman

Yeoman is an open source sleek scaffolding tool that consists frameworks  that make it quick and easy to build web applications.  The neat thing about Yeoman is it combines several functions into one place, such as template generators which we are going to use to get the ASP.NET vNext up and running .
sudo npm install —global yo
Now that  Yeoman is installed the next step is to get our ASP.NET framework installed using the yeoman generator.
npm install -g generator-aspnet
For this examples I selected the MVC Application. Once you have entered an appropriate name, the generator will take care of the rest.

Entername

Now that  MVC application all ready , navigate to the folder  notice the  model, view and control are all there.  Similar to what you find if you used the MVC model template in Visual Studio.

MVCModeliscreated Before you can run your ASP.NET vNext in sublime there are still a couple of dependencies  that need to be installed.  A lot of tutorials I have read miss the  dependencies below but I encountered a lot of errors  when trying to configure the K commands.

Install Mono

In order to run  an ASP.NET vNext on a Mac and Linux environment you need Mono. Copy and paste the code below into your terminal.
git clone https://github.com/mono/mono.git

Install Homebrew

Homebrew is an open source software package management tool ; it enables you install all the stuff you can't directly install in terminal out of the box. To install Homebrew you will need to copy and paste the Ruby code below.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
InstallingHomebrew

Now, that Homebrew installed make sure to install all the extra mono dependencies.

brew install autoconf
brew install automake
brew install libtool

Install the ASP.NET vNext  Tools

If you had already tapped the repo for previous releases(Alpha) you will be  to run the untap command  to delete the old commands and tap again to get the updated brew scripts.

Untap Command

brew untap aspnet/k

Tap Command & Install kvm

brew tap aspnet/k
brew install kvm

InstallingKVM

It is important to note that in the current version of Asp.Net vNext Kestrel doesn’t come with it out of the box. So  in this case since I am  using the "Kestrel": "1.0.0-beta1"  (from "Kestrel": "1.0.0-beta1" ). To find out which version of  Kestrel you are running, open your project.json file in your Asp.Net project.  To install Kestrel copy and paste the code below.
kvm install 1.0.0-beta1

Setting up your project in Sublime

Since this is possibly the first ASP.NET project you will need to install the Kulture  as instructed in here using the package control plugin. If you have some issues with these steps, you can install it manually using the following steps:
  • Open your project in sublime
  • Click view
  • Click show console and copy and paste the python code below
    import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
With Kulture installed you will be able to run you ASP.NET project successfully.  To check to make sure that everything is working, try adding a new namespace into your HomeControllers.cs file.  If everything is in place you will notice the intellisense is in working.

intellsense

Steps to running your project

  • In sublime enter Cmd + Shift + p
  • Type K and  select run K Command
  • Select kpm build
  • Select k kestrel - If everything has installed correctly the server  should start Running the localhost server
  • Navigate  http://localhost:5004/ ASPNET
And there you have it !  Asp.Net vNext on a Mac :) .

aspnetvnextonmac's People

Contributors

ladynaggaga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.