1. Environment construction
Under Windows environment: HTTP://WWW.MICROSOFT.COM/NET/CORE#WINDOWSVS2015
Under Linux environment construction: Http://www.microsoft.com/net/core#linuxcentos
Windows vs Code Environment configuration:
VS code:https://code.visualstudio.com/
After Ann completes, install C # plug-ins in vs Code: C # for Visual Studio Code (powered by Omnisharp)
As shown in the following:
2. dotnet Core Hello Word
New project folder HelloWorld:
or create a folder using cmd:
Go to the HelloWorld folder and execute the following command:
Command explanation:
Dotnet New creates a Dotnetcore project using-T followed by a type to create a project of the specified type, such as Lib, Web. Dotnet New-t Lib
dotnet resotre Restore project dependencies and tools
dotnet Run Execution Program
More commands See:
Https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet
Http://www.cnblogs.com/seayxu/p/dotnet-core-tools-dotnet-new.html
3. Using vs Code debugging
Use vs code to open the Hello Word folder, such as:
Click the "Debug" button:
Click the "Settings" button and select ". Net Core":
Generate a Launch.json file:
Modify the following content:
"Program": "${workspaceroot}/bin/debug/netcoreapp1.0/helloword.dll",
Click on the "Start Debugging" button,
Select. Net Core to generate Task.json.
Continue clicking "Start Debugging".
dotnet Core Learning (a): Environment construction