Developing an ASP. NET Core application using vs code

Source: Internet
Author: User

Developing an ASP. NET Core application using vs code

Get ready

1. Install vs Code https://code.visualstudio.com/

2. Install the node. JS https://nodejs.org/

Install ASP. NET Core and DNX

Install DNVM First

Cmd
" &{$Branch = ' dev '; $wc =new-object System.Net.WebClient; $wc. Proxy=[system.net.webrequest]::D efaultwebproxy; $wc. Proxy.credentials=[system.net.credentialcache]::D efaultnetworkcredentials;invoke-expression ($WC. Downloadstring (' Https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1 ')}"
Powershell
&{$Branch ='dev'; $WC=new-object system.net.webclient;$WC. Proxy=[system.net.webrequest]::D efaultwebproxy;$WC. Proxy.credentials=[system.net.credentialcache]::D efaultnetworkcredentials;invoke-expression ($WC. Downloadstring ('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1') )}

Choose one of the two.

You can use the DNVM command when you are ready to install.

In the cmd input

where DNVM

The installation path for the DNVM is displayed.

Install the build ASP. NET Core Application tool

In the cmd input

Install -G yo generator-aspnet Gulp Bower

If you do not have NPM, install the NPM environment first.

After you install Yo, we can use Yo to generate an ASP. NET Core application.

In the cmd input

Yo ASPNET

We chose the Web application and entered the name, and soon the program was generated.

Use vs Code to open the folder.

Then F1 open the VS Code command line and enter Dnx:restore Packages carriage return.

Once restored, we'll F1 open the VS Code command line and enter Dnx:run command.

Then choose Dnx Web, the following interface appears, run successfully.

In the browser address bar, type: http://localhost:5000/

VS Code is temporarily unable to debug ASP. NET Core, expecting the full version to be debugged and developed.

VS Code Writing code is not a problem, smart tips are very complete.

Reference Documentation:

Https://code.visualstudio.com/docs/runtimes/ASPnet5

If you think this article is helpful to you, please click " recommend ", thank you.

Developing an ASP. NET Core application using vs code

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.