[. NET object-oriented programming in depth] (5). NET MVC 6.0--build cross-platform. NET development environment (Windows/mac OS X/linux)

Source: Internet
Author: User
Tags net command net command line

[. NET object-oriented programming in depth] (5). NET MVC 6.0--build cross-platform. NET development environment (Windows/mac OS X/linux)

1. About Cross-platform

The evolution of MVC was described in the previous article, when the name of. NET 5.0 was renamed to Core 1.0, and MVC 6.0 was also run under Core 1.0 (. NET 5.0).

We want to develop and deploy an MVC 6.0-based project, first to build his development environment.

Core 1.0 is a support cross-platform framework, which describes how to build a development environment under WINDOWS/MAC Os X/linux, respectively.

2. Windows-based environment installation

A. Installing ide:visual Studio 2015/visual Studio Code

Installation package: Visual Studio Code

B. Install. NET 5.0:

(1) You can use the. NET 5.0 installation package or use the command line.

Installation package:. NET 5.0

(2) You can also install. NET 5.0 from the command line

. NET execution Environment (DNX):. NET runtime Environment

to install DNX, you need to install a tool first:

. NET Version Manager (DNVM):. NET version Management

DNVM installation methods are as follows:

Open it. NET command line, enter:

" &{$Branch = ' dev '; IEX (New-object net.webclient). Downloadstring (' Https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1 ')}"

After running, you can view the DNVM's help documentation.

Here are two common commands:

Using DNVM to install DNX. NET Core (Core library)

DNVM Upgrade-r CORECLR

Install the complete. NET Framework library (full library) using DNVM

DNVM upgrade-r CLR

C. Other:

Windows7 or the Windows Server R2 operating system, you also need to install Visual C + + redistributable for visual Studio Update 4.

development environment under 3.MAC OS x

A. Installing Mono for OS X (Visual Studio Code Prerequisite environment)

mono:http://www.mono-project.com/docs/getting-started/install/mac/

B. Install Visual Studio Code

VS Code:https://az764295.vo.msecnd.net/stable/45d69357c9eb068dd8e624f5b0fe461cd2078d88/vscode-darwin.zip

C.asp.net 5 for Mac OS X

ASP. 5 Mac Version: https://download.microsoft.com/download/B/0/A/B0AEBD7D-6979-4265-B1AC-A0B73618FB22/ Dnx-1.0.0-rc1-update1.pkg

D. Installing. NET 5 using the command line

Similarly, you can install. NET 5 by using the command line as follows:

(1) installation. NET Versioning tool, DNVM (. NET version manager)

Curl-ssl https://raw.githubusercontent.com/aspnet/home/dev/dnvminstall.sh | Dnx_branch=dev sh && source ~/.dnx/dnvm/dnvm.sh

The DNX version is displayed with the following instructions:

DNVM List

Show Dnvx help, as follows:

Dnvm

. NET version Manager (DNVM) for installing different versions of the. NET execution Environment (DNX) on OS X.

(2) Install with DNVM. NET run environment (DNX) based on. NET Core:

DNVM Upgrade-r CORECLR

(3) installation. NET runtime Environment (DNX) based on Mono

Install mono or homebrew first.

Then use DNVM to install mono

DNVM Upgrade-r Mono

By default, if you do not specify, you install Mono

4.Linux under development environment

A. Installing A. NET 5 Linux-based installation package

: https://download.microsoft.com/download/B/0/A/B0AEBD7D-6979-4265-B1AC-A0B73618FB22/ Dnx-coreclr-linux-x64.1.0.0-rc1-update1.tar.gz

B. Installing the. NET execution Environment (DNX)

Install the version Manager first (DNVM)

(1) Unzip and curl (if not installed)

sudo apt-get Install unzip curl

(2) Download and install DNVM:

Curl-ssl https://raw.githubusercontent.com/aspnet/home/dev/dnvminstall.sh | Dnx_branch=dev sh && source ~/.dnx/dnvm/dnvm.sh

Ancheng the above two-step version Manager installation, install below. NET usage Environment:

(1) . NET Core Environment

sudo apt-get install Libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev Uuid-dev
DNVM Upgrade-R CORECLR

(2) Mono environment

First install mono Mono-complete pack

Then make sure the Ca-certificates-mono package is installed, here is the installation precautions noted

Finally, use DNVM to install the mono environment:

DNVM Upgrade-r Mono

5. Summary:

This article mainly introduces the development environment of MVC6. NET 5 (Core 1) under the environment of three platforms to build, see. NET cross-platform, for. NET developers, it's a very happy thing, if you're a Mac or Linux, run. NET 5 quickly.

==============================================================================================

Back to Catalog

< If it is helpful to you, please remember to click on the recommendation Oh, if there is have no understanding or error the Place , please communicate more >

< for those who have difficulty reading this series of articles, please read ". NET object-oriented programming fundamentals" and ". NET object-oriented programming advanced " >

< REPRINT statement: Technology needs to share the spirit, welcome to reprint the article in this blog, but please specify copyright and url>

. NET Technology Exchange Group: 467189533

==============================================================================================

[. NET object-oriented programming in depth] (5). NET MVC 6.0--build cross-platform. NET development environment (Windows/mac OS X/linux)

Related Article

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.