Summary
Microsoft released. NET Core 1.0,asp.net Core 1.0 and Entity Framewok 1.0 also for some time, has not carried out this aspect of the study, the pre-festival company lets investigate this aspect feasibility. So let's start with the basics.
Environment
Development uses vs code to compare lightweight. A few 10 trillion and vs2015 are really small. Try to install the vs2015, installed a day, nor installed, no words anymore.
. NET Core SDK
Installing Sdk:https://www.microsoft.com/net/download
To see if the installation was successful by command cmd:
Install vs Code
https://code.visualstudio.com/
Install node. js
https://nodejs.org/en/
Start installing Nodejs, which is installed by default under C:\Program Files\nodejs. NPM already exists by default in this directory, and other plugins can be installed via NPM
Creating an ASP. NET Core site
Create a Web project under E:\aspnetcoreweb
Input command
dotnet NEW-T Web
Command
dotnet Restore
Command
Dotnet Run
At this point you can enter: http://localhost:5000 on the browser to access the
Use CTRL + C to stop the project.
Use the VS Code Editor to open the folder.
If this is the first time you've opened a C # project with VS Code, you'll need to wait for it to download. NET Core Debugger.
As shown, select Yes.
Use the command to install yo
NPM Install-g yo
Attention:
The following warning appears during the installation of Yo
NPM WARN deprecated [email protected]: This package had been reintegrated into NPM and are now out of date with respect to Npm
Can be repaired by running the following command
NPM i-g Yeoman-doctor
Install ASP. NET generator using the command
NPM install-g generator-aspnet
The following warning may be present
This is a re-install yo on it.
Installing ASP. Generator
NPM install-g generator-aspnet
After Yo is installed, you can build the project, controller and view with Yo.
Add Controller
Using Yo to add a controller
Yo Aspnet:mvccontroller Bbscontroller
Here's the problem.
' Yo ' is not an internal or external command, nor is it a running program
or batch file.
Toss to death, and now also did not run successfully. Viewing on-line is caused by a problem with node's environment variable setting.
Run the command cleanup under NPM cache and reinstall
NPM install-g [email protected]
Re-install Yo
See if Yo can use the command
Yo-v
Finally installed successfully, really toss AH.
As you can see above, you'll find that you can also create a new ASP. NET Core site via yo.
Open vs code use the yo command to create a new controller
Yo Aspnet:mvccontroller Bbscontroller
Ah ...
There's been a breakdown here.
I've given up and tried two computers, and that's the problem.
You can refer to this article for the following
Http://www.cnblogs.com/Leo_wl/p/5634574.html
Summarize
Most of the time wasted on the installation of the environment. Completely have no temper, have the opportunity to try again, toss to the wee 12.
VS Code Development Net core encounters pits