.NET Core 2.1 TFS构建在还原步骤失败

.NET Core 2.1 TFS构建在还原步骤失败

问题描述:

我尝试在TFS中构建.NET Core项目,但在还原步骤中构建失败,并出现
错误:失败:找不到dotnet:null 错误。

I try to build my .NET Core proj in TFS but the build failed in restore step with Error: Failed which: Not found dotnet: null error.

.NET Core版本:2.1.3
TFS版本:15.112.26307.0
构建定义:.NET Core(PREVIEW)

.NET Core version: 2.1.3 TFS version: 15.112.26307.0 Build definition: .NET Core (PREVIEW)

如果您的构建计算机上未安装.NET Core SDK,则可能会发生这种情况。

This can happen if you don't have the .NET Core SDK installed on your build machine.

您可以确定拥有最新版本的.NET Core SDK吗?例如,您应该能够登录到构建计算机并从命令行运行 dotnet 并获取基本的使用信息。

Can you make sure you have the latest version of the .NET Core SDK? For example, you should be able to log in to your build machine and run dotnet from the command line, and get basic usage information.

您可以从 https:/下载最新版本的.NET Core SDK。 /www.microsoft.com/net/download/windows