Visual studio code initial experience in Mac OS and studio initial experience

Source: Internet
Author: User
Tags install homebrew

Visual studio code initial experience in Mac OS and studio initial experience
Visual studio code initial experience in Mac OS

With the step-by-step development of Microsoft's open-source policy, Microsoft finally waited for the cross-platform Visual Studio Code. As A. NET plug-in using macbooks, it is a blessing. (I tried to use Xamarin/Eclipse/IDEA to edit the. net source code on a Mac, which is not very nice to use .)

The process of building a development environment on the mac system is simple.

Install and install HomeBrew in dependent Environment

To install Open-Source Software in MacOS, Hombrew is essential. Therefore, first install HomeBrew, open Terminal, and execute

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

Run

npm install -g yo grunt-cli generator-aspnet bower
Install yeoman

Execute in shell:

npm install -g yo grunt-cli generator-aspnet bower
Install dnx

Run

brew tap aspnet/dnxbrew updatebrew install dnvm

This step has a pitfall. If brew update fails, it must be resolved. Otherwise, the wrong dnx version may be installed.

During this installation process, HomeBrew will try to install Mono.

You cannot use it immediately after installation. You need to configure the shell environment variable ~ /. Add the following to bash_profile:

export MONO_MANAGED_WATCHER=falsesource dnvm.shexport PATH=$PATH:~/.dnx/runtimes/dnx-mono.1.0.0-beta4/bin

Note:export MONO_MANAGED_WATCHER=falseIf not configured, the ASPNET will have a kqueue error.

In addition, it is possible that no download is available for dnx after the dnvm is installed (I have encountered it ). Thereforesource dnvm.shYou can rundnvm upgrade. After execution, check ~ /. Whether the dnx directory contains only empty directories. If yes, remove dnx-mono and re-Execute dnvm upgrade.

Start the first project
yo aspnet

Select Web Application and enter the project template. The following message is displayed:

At this time, you have two options
1. Restore the nuget package in the terminal

dnu restore

Or open vscode directly.

Visual studio provides command line integration similar to sublime. Use Command + P to call out the Command line tool and enter:

>dnu restore

In this case, the nuget package is automatically restored.

At this time, your first web app can be run. Just give it a try. Similarly, use Command + P to call out the Command line interface and enter

>dnx . kestrel

At this time, your web app can be seen on port 5001.

Summary

The entire process is still relatively smooth. visual studio code is currently only a "code" tool and cannot be expected to be as useful as some full-stack development tools. However, this step at least shows that Microsoft has taken the lead in open source.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.