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