. NET Core Windows environment installation and configuration tutorial, core installation and configuration tutorial
1. Install. NET Core SDK
It is best to use Visual Studio to develop. NET Core in windows. And installation:
VS2015 Latest Version:. Net Core:. NET Core 2015 for Visual Studio in Visual Studio 1.0 Update 3 * VS environment dotnetcore.1.0.0-vs2015tools.preview2.exe
. Net Core installation process (the installation process is slow, so please wait patiently ):
(Installation is slow, waiting .......)
(OK, the installation is complete, and the next step ......)
. Net Core can be downloaded from https://www.microsoft.com/net/download:
VS Ent 2015 sp3:
Note:
(1) VS2015 can use the free development tool Visual Studio Community or Visual Studio Code.
(2) Verify that Windows dependencies has been installed before installation.
(3) If you use your preferred command line tool or Visual Studio Code, you need to download. NET Core SDK for Windows.
Development tools, see https://www.visualstudio.com/downloads/download-visual-studio-vs
2. VS2015 initialization code
Let's initialize a Hello World application.
Development Environment VS Ent 2015 and. Net Core 1.0 for Visual Studio
2.1 create a project and select. Net Core
Note:. Net Core supports the minimum version of Framework 4.5.
2.2 select Console Application
Project name: FirstNetCore
Click "OK" to install and create a project.
2.3 project structure
You can see that the package is being restored. Please wait patiently ...... The following output is complete.
Log: Writing lock file to disk. Path: c: \ users \ xxtt \ documents ents \ visual studio 2015 \ Projects \ FirstNetCore \ src \ FirstNetCore \ project. lock. json
Log: c: \ users \ xxtt \ documents ents \ visual studio 2015 \ Projects \ FirstNetCore \ src \ FirstNetCore. xproj
Log: Restore completed in 124001 ms.
Solution:
Solution Items is the global configuration file directory: global. json. open the file to view:
The src directory is the source file storage and project configuration file.
2.4 modify the Program. cs file and compile and run it
Modify the Program. cs file:
Press F5 to compile and run:
The following are the debugging output results:
Export dotnet.exe "(CoreCLR: DefaultDomain):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Private. CoreLib. ni. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" c: \ users \ xxtt \ documents \ visual studio 2015 \ Projects \ FirstNetCore \ src \ FirstNetCore \ bin \ Debug \ netcoreapp1.0 \ FirstNetCore has been loaded. dll ". The loaded symbol.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Runtime. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export 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.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Console. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Threading. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. IO. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. IO. FileSystem. Primitives. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Text. Encoding. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Text. Encoding. Extensions. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
Export dotnet.exe "(CoreCLR: clrhost):" C: \ Program Files \ dotnet \ shared \ Microsoft. NETCore. App \ 1.0.0 \ System. Threading. Tasks. dll "has been loaded ". The loaded symbols are skipped. The module is optimized and the debugger option "My code only" is enabled.
The program "[4392] dotnet.exe: Program trace" has exited and the return value is 0 (0x0 ).
The program "[4392] dotnet.exe" has exited and the returned value is-1 (0 xffffffff ).
3. Use the command line to initialize the code
Open the command line and enter the following content: (create a project directory -- go to the project directory -- create a project)
Mkdir hwapp
Cd hwapp
Dotnet new
Dotnet restore Reset project. json
Dotnet run
Press Enter:
3. Reference websiteHttps://www.microsoft.com/net/core
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.