获取 SDK

搜索“下载 .net core”,在微软为你所在平台提供的下载页面,获取 .NET Core 的 SDK。完成 SDK 的安装后,开启一个终端窗口(或者 Windows 上的 PowerShell),并使用 dotnet 命令行工具(command line tool,也叫 CLI)确保一切正常工作:

  1. dotnet --version
  2. 2.1.104

还可以通过 --info 选项,获取你所在平台更详细的信息:

  1. dotnet --info
  2. .NET Command Line Tools (2.1.104)
  3. Product Information:
  4. Version: 2.1.104
  5. Commit SHA-1 hash: 48ec687460
  6. Runtime Environment:
  7. OS Name: Mac OS X
  8. OS Version: 10.13
  9. (more details...)

如果你看到类似于上面的输出,就大步前进吧。


Get the SDK

Search for “download .net core” and follow the instructions on Microsoft’s download page to get the .NET Core SDK. After the SDK has finished installing, open up the Terminal (or PowerShell on Windows) and use the dotnet command line tool (also called a CLI) to make sure everything is working:

  1. dotnet --version
  2. 2.1.104

You can get more information about your platform with the --info flag:

  1. dotnet --info
  2. .NET Command Line Tools (2.1.104)
  3. Product Information:
  4. Version: 2.1.104
  5. Commit SHA-1 hash: 48ec687460
  6. Runtime Environment:
  7. OS Name: Mac OS X
  8. OS Version: 10.13
  9. (more details...)

If you see output like the above, you’re ready to go!