. NET Core Windows Environment installation and experience

Source: Internet
Author: User
Tags dotnet

1. Install the. NET Core SDK

Developing. NET core under Windows is best used with Visual Studio Tools. With installation:

    • VS2015 Latest Version: Visual Studio update
    • The. Net core:.net Core 1.0 for Visual Studio in the VS environment corresponds to the downloaded file Dotnetcore.1.0.0-vs2015tools.preview2.exe

The. Net Core installation process (the installation process is slow, the pro waits patiently):

(Installation is slow, waiting ...) (OK, finally the installation is complete, start the next step ...) )

. Net core can be downloaded from https://www.microsoft.com/net/download:

VS Ent SP3:

Attention:

(1) VS2015 can use free development tools for Visual Studio Community or Visual Studio Code.

(2) First confirm that Windows dependencies is installed before installing.

(3) If you use your favorite command line tool or use Visual Studio Code, you need to download the. NET Core SDK for Windows tightly.

2. VS2015 Initialization 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 will also have 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 a global profile directory: Global.json, open File View:

SRC directory is the source file that is stored with the project configuration file

2.4 Modifying the Program.cs file and compiling the run

To modify the Program.cs file:

Press F5 to compile the 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 ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" 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 ”。 Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): "C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\mscorlib.dll" is loaded. Unable to find or open PDB file.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\system.console.dll ”。 Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Threading.dll ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): "C:\Program Files\dotnet\shared\microsoft.netcore.app\1.0.0\system.io.dll" is loaded. Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.IO.FileSystem.Primitives.dll ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Text.Encoding.dll ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Text.Encoding.Extensions.dll ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
"Dotnet.exe" (coreclr:clrhost): Loaded "C:\Program files\dotnet\shared\microsoft.netcore.app\1.0.0\ System.Threading.Tasks.dll ". Loaded symbols have been skipped. The module is optimized, and the debugger option "Just My Code" is enabled.
Program "[4392] Dotnet.exe: Program Trace" 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 initialization 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#windows

. NET Core Windows Environment installation and experience

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.