The latest ASP. NET Vnext is already available for running on Mac, of course, mono. Mac installation is a little cumbersome compared to Linux. For most programmers who use Windows to develop ASP, the initial configuration is time-consuming. I listed here detailed installation procedures, convenient for everyone to develop at the same time, but also to make a memo for themselves.
To run. NET program that requires a new kre environment, at least the installation of Xcode,homebrew and ASP. VNext Command line Tools.
Of course, in order to facilitate future development, I recommend that you install Yeoman, in order to install Yeoman, we need Nodejs npm.
To summarize, we need to install the following software
1. Xcode
2. Homebrew
3. asp. VNext Command Line Tools
4. Nodejs
5. Yeoman
If you are familiar with homebrew, you can jump straight to 3. OK, let's install it one step at a moment.
One, Xcode installation
This is the simplest, to the Apple website directly download on the line, of course, you can download with AppStore. It's https://developer.apple.com/xcode/downloads/.
It is important to note that even if you are not ready to develop with Xcode, run it once and agree to Apple's license agreement. Otherwise, the homebrew cannot be installed later.
Second, homebrew installation
This is much simpler, just run the following command, and remember not to use the sudo command, or run under the root user, or you will be prompted not to use the root user.
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
If you run an error, you can refer to the Install Xcode section above and agree to Apple's license agreement. After the installation is complete, run
Brew Doctorbrew Update
For verification and upgrade.
Iii. installing ASP. VNext Command Line Tools
After installing the homebrew is very simple, run the following command to install
Brew Untap aspnet/k //If you have previously installed, to uninstall first, do not run the brew tap Aspnet/kbrew install KVM
Remember to run when you are finished installing
SOURCE kvm.sh
and add the above command to the. BASHRC and. bash_profile files, or the new terminal will not find the KVM command. After installing tools, run the following command to install Kre, which will download and configure the corresponding Kre based on your machine. The corresponding Mac is mono.
KVM Upgrade
After the Kre installation is complete, you can run with K restore, K run and K Kestrel. NET program. How to use, in the future article will do the introduction.
Iv. installation of Nodejs
Actually to the third step, run. NET Kre has been installed, but the Nodejs NPM is also installed in view of the use of other third-party package programs in the Vnext architecture.
Here spit groove, Nodejs old bank bad good, but got up the package management, also out of NPM Enterprise Edition. I really don't know how to insert willow trees.
Since NPM is included in the Nodejs, it is simple and convenient to download and install the installation package directly to the Nodejs website. The address is http://nodejs.org.
Five, install the template tool Yeoman
I'm sure everyone knows that the VS. new project will generate default files according to the template, greatly improving the efficiency (deleting redundant files is faster than adding necessary files). On the Mac to use this tool, wordy, this tool also supports other languages, we are interested to study. Okay, just run the following command to install
NPM install-g yonpm install-g generator-aspnet
After the installation is complete, run under the project folder
Yo ASPNET
Then follow the prompts and press the arrow keys to select MVC application to generate the template. If you want to run it, run
K Restorek Kestrel
The default is 5004 port, the browser input localhost:5004 view.
OK, Mac on the Kre environment so installed, can be more complex than the Windows Installation Wizard, but at least can be developed on the Mac, but also a great job (loaded with one). But the lack of the IDE, I will teach you to build the IDE, so happy to develop our next generation of ASP.
Finally, a list of relevant environmental software website address, interested in research can be in-depth study.
homebrew:http://brew.sh
VNext clt:https://github.com/aspnet/home#getting-started
nodejs:http://nodejs.org
Yeoman:http://yeoman.io
Write ASP. VNext (a) Kre environment setup on MAC OS x