One of the. Net Core series Hello World

Source: Internet
Author: User
Tags dotnet

OS:

WIN10 Enterprise Edition Chinese Environment

. Net Core:

  Remember not to install version 64, or you may have a project that vs2017 cannot generate. NET Core 2.0

  dotnet-sdk-2.0.0-win-x86.exe:https://download.microsoft.com/download/0/f/d/ 0fd852a4-7ea1-4e2a-983a-0484ac19b92c/dotnet-sdk-2.0.0-win-x86.exe

dotnet-runtime-2.0.0-win-x64.exe:https://download.microsoft.com/download/5/6/b/ 56bfef92-9045-4414-970c-ab31e0fc07ec/dotnet-runtime-2.0.0-win-x64.exe

VS2017 community 15.3.3:

vs_community__101603913.1505015285:https://www.visualstudio.com/zh-hans/ Thank-you-downloading-visual-studio/?sku=community&rel=15

If VS2017 community 15.3.3 cannot create a new. NET Core 2.0 project after the installation is complete, delete both the C:\Program files\dotnet and C:\Program Files (x86) \dotnet directories. Restart, and then reinstall the x86 version of. Net Core above.

Take VS2017 community 15.3.3 new. NET Core 2.0 project:

  1. New Items:

Reference Tutorial: Https://docs.microsoft.com/zh-cn/dotnet/core/tutorials/with-visual-studio

 2. Commissioning Project:

    In the menu bar, choose Build > Build Solution. This compiles the program into an intermediate language (IL), which is then converted to binary code by the just-in-time (JIT) compiler.

run the program by selecting the HelloWorld button with the green arrow on the toolbar.

  3. Publish the project:

    Reference Tutorial: Https://docs.microsoft.com/zh-cn/dotnet/core/tutorials/publishing-with-visual-studio

generate EXE: Modify. csproj file, mainly add " < Runtimeidentifier>win10-x64</runtimeidentifier> < Outputtype>exe</outputtype>

1 <project sdk="Microsoft.NET.Sdk">2   <propertygroup >3     <OutputType>Exe</OutputType>4     <targetframework>netcoreapp2.  0</TargetFramework>5     <RuntimeIdentifier>win10-x64</RuntimeIdentifier> 6   </PropertyGroup>7 </Project>

The. exe file is automatically produced in the \bin\release\publishoutput directory.

One of the. Net Core series Hello World

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.