1, install the. NET Core SDK
It is best to use Visual Studio Tools to develop. NET core under Windows. Download Address and Installation:
VS2015 Latest Version: Visual Studio 2015 Update 3* vs. Net core:.net Core 1.0 for Visual Studio download files Dotnetcore.1.0.0-vs2015tool S.preview2.exe
. Net Core installation process (slow installation process, patience to wait):
(slow installation, waiting ...)
(OK, finally installed completed, start next ...) )
The. Net core is available for download from Https://www.microsoft.com/net/download:
VS Ent 2015 SP3 effect chart:
Attention:
(1) VS2015 can use the Free development tool Visual Studio Community or Visual Studio Code.
(2) First verify that Windows dependencies is installed before installing.
(3) If you use your own preferred command-line tools or use Visual Studio Code, you will need to download the. NET Core SDK for Windows tightly.
development tool Download Address, refer to Https://www.visualstudio.com/downloads/download-visual-studio-vs
2, VS2015 initialization of the code
Let's initialize a Hello World application.
Development environment vs ENT 2015 with. Net Core 1.0 for Visual Studio
2.1 New project, select. Net Core
Note: The minimum version of. Net Core support is the framework 4.5.
2.2 Select Console Application
Project Name: Firstnetcore
Click "OK" to install for project creation.
2.3 Project Structure
You can see that the package is being restored. This process is also to wait patiently ... See the following output even if complete
log:writing lock file to disk. Path:c:\users\xxtt\documents\visual Studio 2015\projects\firstnetcore\src\firstnetcore\project.lock.json
Log:c:\users\xxtt\documents\visual Studio 2015\projects\firstnetcore\src\firstnetcore\firstnetcore.xproj
Log:restore completed in 124001ms.
Solution:
Solution items is the Global profile directory: Global.json, open File View:
SRC directory is source files stored with project configuration files
2.4 Modify Program.cs file and compile and run
To modify the Program.cs file:
Press F5 to compile and run:
The following are the debug output results:
"Dotnet.exe" (coreclr:defaultdomain): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Private.CoreLib.ni.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded c:\users\xxtt\documents\visual Studio 2015\projects\firstnetcore\src\ Firstnetcore\bin\debug\netcoreapp1.0\firstnetcore.dll ". The symbol is loaded.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\system.runtime.dll ”。 The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): "C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\mscorlib.dll" has been loaded. Unable to find or open the PDB file.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\system.console.dll ”。 The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Threading.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): "C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\system.io.dll" has been loaded. The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.IO.FileSystem.Primitives.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Text.Encoding.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Text.Encoding.Extensions.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Threading.Tasks.dll ". The load symbol has been skipped. The module is optimized and the debugger option "My Code only" is enabled.
The program "[4392] Dotnet.exe: Program Trace" has exited with a return value of 0 (0x0).
The program "[4392] Dotnet.exe" has exited with a return value of-1 (0xFFFFFFFF).
3, using the command line to initialize the code
Open the command line and enter the following: (Create project directory-go to project directory-Create Project)
mkdir Hwapp
CD Hwapp
dotnet New
dotnet Restore Reset Project.json
Dotnet Run
Press the ENTER key:
3, reference website https://www.microsoft.com/net/core
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.