Visual Studio Team Services ASPNET CORE构建失败

问题描述:

我正在尝试为新的ASPNET Core web应用程序设置构建定义。Visual Studio Team Services ASPNET CORE构建失败

构建定义的设置是正是这一点: Official Docs

构建在构建解决方案与此错误失败:

Issues 
Build 

File name doesn't indicate a full path to a executable file. 

GETSDKTOOLINGINFO (0, 0) 
The project is configured to use .NET Core SDK version 1.0.0-preview2-003131 which is not installed or cannot be found under the path C:\Program Files\dotnet. These components are required to build and run this project. Download the version of .NET Core SDK specified in global.json or update the SDK version in global.json to the version that is installed. 

Process 'msbuild.exe' exited with code '1'. 

上的任何猜测如何解决这个问题? 谢谢 Francesco

+0

你解决这个问题,我的解决方案? –

+0

如果我们的解决方案解决了您的问题,您可以将其标记为答案。 –

您需要安装相应版本的.Net SDK来构建代理机器。

您可以参考this文章下载.Net Core 1.0.0-preview2-003131并将其安装到您的构建机器上。

+0

网址被破坏了,所以我更新了它 –

+0

@CiaranBruen谢谢。 –

假设您使用的是托管构建代理。据Software on the hosted build server,托管生成服务器部署有以下.NET框架:

  • .NET 4.6
  • .NET 4.5.2
  • .NET 4.5.1
  • .NET 4.5
  • .NET 3.5 SP1
  • .NET核心1.0预览2工装

你可以尝试d eploy一个本地构建代理,并安装.NET Core 1.0.1 SDK 1.0.0-preview2-003131与VSTS一起工作:https://www.visualstudio.com/en-us/docs/build/admin/index#deploy_agent

如果你坚持使用托管生成代理,那么你需要使用安装在VSTS Microsoft.NETCore.App的版本,例如:

"dependencies": { 
    "Microsoft.NETCore.App": { 
     "version": "1.0.0-rc2-3002702", 
     "type": "platform" 
    }, 

对我来说,这只是一个变化在global.config:

{ 
    "projects": [ "src", "test" ], 
    "sdk": { 
    "version": "1.0.0-preview2-003121" 
    } 
} 

只要1.0.0-preview2-003131不适用于VSO建立主机