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