0

We are really starting to get frustruated now with our development of .NET Core applications.

We have a solution/repository where we have gathered all our .NET core projects, it works fine locally to build within Visual Studio 2015, but as soon as we try to setup CI builds and other builds they all fails.

The error that we always get back to is the infamous "GETSDKTOOLINGINFO(0,0): Error : The project is configured to use .NET Core SDK version 1.0.0-preview2-1-003177 which is not installed or cannot be found."

We are running dotnet restore before with no luck. We have more or less tried everything.

And here comes the annoying part, and the actually issue:

If we copy the build command and run it locally on the build agent server in a normal command prompt it works just fine, with no errors

For instance this command: "C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild.exe" "D:\_work\11\s\core.sln" /nologo /m /nr:false /fl /flp:"logfile=D:\_work\11\s\core.sln.log" /dl:CentralLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"

Don't work through the TFS build.

The command does work locally on the build agent machine.

EDIT 1: Below screen show that we do not use any special build step. We have changed to "msbuild build step" with the same bad result.

enter image description here

EDIT 2: Log

2017-02-23T08:24:34.3679600Z Starting task: Build solution 2017-02-23T08:24:34.4304594Z Executing the powershell script: D:\tasks\VSBuild\1.0.16\VSBuild.ps1 2017-02-23T08:24:34.6335861Z D:\agent\worker\tools\NuGet.exe restore "D:\_work\5\s\ServiceFabric.Frontend.sln" -NonInteractive 2017-02-23T08:24:35.0085872Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. 2017-02-23T08:24:35.1335875Z Restoring NuGet package Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0. 2017-02-23T08:24:35.4054303Z Adding package 'Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0' to folder 'D:\_work\5\s\packages' 2017-02-23T08:24:35.7960574Z Added package 'Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0' to folder 'D:\_work\5\s\packages' 2017-02-23T08:24:35.8273065Z C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe "D:\_work\5\s\ServiceFabric.Frontend.sln" /nologo /m /nr:false /t:"Clean" /fl /flp:"logfile=D:\_work\5\s\ServiceFabric.Frontend.sln-clean.log" /dl:CentralLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:platform="x64" /p:configuration="release" /p:VisualStudioVersion="14.0" 2017-02-23T08:24:35.9210571Z Build started 2017-02-23 09:24:35. 2017-02-23T08:24:35.9523075Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" on node 1 (Clean target(s)). 2017-02-23T08:24:35.9523075Z 1>ValidateSolutionConfiguration: 2017-02-23T08:24:35.9523075Z Building solution configuration "release|x64". 2017-02-23T08:24:36.0148080Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\Common\Log\Log.xproj" (2) on node 1 (Clean target(s)). 2017-02-23T08:24:36.0148080Z 2>CoreClean: 2017-02-23T08:24:36.0148080Z Creating directory ".\obj\Release\". 2017-02-23T08:24:36.0148080Z 2>Done Building Project "D:\_work\5\s\Common\Log\Log.xproj" (Clean target(s)). 2017-02-23T08:24:36.2648091Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (5) on node 4 (Clean target(s)). 2017-02-23T08:24:36.2648091Z 5>CoreClean: 2017-02-23T08:24:36.2648091Z Creating directory "obj\x64\Release\". 2017-02-23T08:24:36.3116863Z 5>Project "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (5) is building "D:\_work\5\s\ServiceFabric\Clients\Portal.xproj" (6) on node 1 (Clean target(s)). 2017-02-23T08:24:36.3116863Z 6>CoreClean: 2017-02-23T08:24:36.3116863Z Creating directory ".\obj\Release\". 2017-02-23T08:24:36.3585616Z PreComputeCompileTypeScript: 2017-02-23T08:24:36.3585616Z C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe --noEmitOnError 2017-02-23T08:24:36.3585616Z 6>Done Building Project "D:\_work\5\s\ServiceFabric\Clients\Portal.xproj" (Clean target(s)). 2017-02-23T08:24:36.3585616Z 5>Done Building Project "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (Clean target(s)). 2017-02-23T08:24:36.3898104Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\Common\Core\Core.xproj.metaproj" (8) on node 1 (Clean target(s)). 2017-02-23T08:24:36.3898104Z 8>Project "D:\_work\5\s\Common\Core\Core.xproj.metaproj" (8) is building "D:\_work\5\s\Common\Core\Core.xproj" (9) on node 2 (Clean target(s)). 2017-02-23T08:24:36.3898104Z 9>CoreClean: 2017-02-23T08:24:36.3898104Z Creating directory ".\obj\Release\". 2017-02-23T08:24:36.3898104Z 9>Done Building Project "D:\_work\5\s\Common\Core\Core.xproj" (Clean target(s)). 2017-02-23T08:24:36.3898104Z 8>Done Building Project "D:\_work\5\s\Common\Core\Core.xproj.metaproj" (Clean target(s)). 2017-02-23T08:24:36.3898104Z 1>Done Building Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (Clean target(s)). 2017-02-23T08:24:36.3898104Z Build succeeded. 2017-02-23T08:24:36.3898104Z 0 Warning(s) 2017-02-23T08:24:36.3898104Z 0 Error(s) 2017-02-23T08:24:36.3898104Z Time Elapsed 00:00:00.46 2017-02-23T08:24:36.4054367Z C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe "D:\_work\5\s\ServiceFabric.Frontend.sln" /nologo /m /nr:false /fl /flp:"logfile=D:\_work\5\s\ServiceFabric.Frontend.sln.log" /dl:CentralLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"D:\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:platform="x64" /p:configuration="release" /p:VisualStudioVersion="14.0" 2017-02-23T08:24:36.4835619Z Build started 2017-02-23 09:24:36. 2017-02-23T08:24:36.4991873Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" on node 1 (default targets). 2017-02-23T08:24:36.4991873Z 1>ValidateSolutionConfiguration: 2017-02-23T08:24:36.4991873Z Building solution configuration "release|x64". 2017-02-23T08:24:36.5460612Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (2) on node 1 (default targets). 2017-02-23T08:24:36.5460612Z 2>PrepareForBuild: 2017-02-23T08:24:36.5460612Z Creating directory "bin\Release\". 2017-02-23T08:24:36.8273147Z 2>Project "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (2) is building "D:\_work\5\s\ServiceFabric\Clients\Portal.xproj" (3) on node 1 (default targets). 2017-02-23T08:24:36.8273147Z 3>PrepareForBuild: 2017-02-23T08:24:36.8273147Z Creating directory ".\bin\". 2017-02-23T08:24:36.8273147Z PreComputeCompileTypeScript: 2017-02-23T08:24:36.8273147Z C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe --noEmitOnError 2017-02-23T08:24:36.8273147Z CompileTypeScript: 2017-02-23T08:24:36.8273147Z C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe --noEmitOnError 2017-02-23T08:24:36.8429390Z ##[error]GETSDKTOOLINGINFO(0,0): Error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. 2017-02-23T08:24:36.8429390Z 3>GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. [D:\_work\5\s\ServiceFabric\Clients\Portal.xproj] 2017-02-23T08:24:36.8429390Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\Common\Configuration.Core\Configuration.Core.xproj" (5) on node 2 (default targets). 2017-02-23T08:24:36.8429390Z 5>PrepareForBuild: 2017-02-23T08:24:36.8429390Z Creating directory ".\bin\". 2017-02-23T08:24:36.8429390Z 3>Done Building Project "D:\_work\5\s\ServiceFabric\Clients\Portal.xproj" (default targets) -- FAILED. 2017-02-23T08:24:36.8429390Z 2>Done Building Project "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (default targets) -- FAILED. 2017-02-23T08:24:36.8585648Z 5>Project "D:\_work\5\s\Common\Configuration.Core\Configuration.Core.xproj" (5) is building "D:\_work\5\s\Common\Core\Core.xproj" (7) on node 2 (default targets). 2017-02-23T08:24:36.8585648Z 7>PrepareForBuild: 2017-02-23T08:24:36.8585648Z Creating directory ".\bin\". 2017-02-23T08:24:36.8898141Z 1>Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (1) is building "D:\_work\5\s\Common\Log\Log.xproj" (6) on node 4 (default targets). 2017-02-23T08:24:36.8898141Z 6>PrepareForBuild: 2017-02-23T08:24:36.8898141Z Creating directory ".\bin\". 2017-02-23T08:24:36.9054497Z ##[error]GETSDKTOOLINGINFO(0,0): Error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. 2017-02-23T08:24:36.9054497Z 6>GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. [D:\_work\5\s\Common\Log\Log.xproj] 2017-02-23T08:24:36.9054497Z 6>Done Building Project "D:\_work\5\s\Common\Log\Log.xproj" (default targets) -- FAILED. 2017-02-23T08:24:36.9054497Z 7>Done Building Project "D:\_work\5\s\Common\Core\Core.xproj" (default targets) -- FAILED. 2017-02-23T08:24:36.9210662Z 1>Done Building Project "D:\_work\5\s\ServiceFabric.Frontend.sln" (default targets) -- FAILED. 2017-02-23T08:24:36.9210662Z Build FAILED. 2017-02-23T08:24:36.9210662Z "D:\_work\5\s\ServiceFabric.Frontend.sln" (default target) (1) -> 2017-02-23T08:24:36.9210662Z "D:\_work\5\s\ServiceFabric\Clients\FronEnd.sfproj" (default target) (2) -> 2017-02-23T08:24:36.9210662Z "D:\_work\5\s\ServiceFabric\Clients\Portal.xproj" (default target) (3) -> 2017-02-23T08:24:36.9210662Z (GetSDKToolingInfoTarget target) -> 2017-02-23T08:24:36.9210662Z GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. [D:\_work\5\s\ServiceFabric\Clients\Portal.xproj] 2017-02-23T08:24:36.9210662Z "D:\_work\5\s\ServiceFabric.Frontend.sln" (default target) (1) -> 2017-02-23T08:24:36.9210662Z "D:\_work\5\s\Common\Log\Log.xproj" (default target) (6) -> 2017-02-23T08:24:36.9210662Z GETSDKTOOLINGINFO : error : The .NET Core SDK is not installed or cannot be found. These components are required to build and run this project. [D:\_work\5\s\Common\Log\Log.xproj] 2017-02-23T08:24:36.9210662Z 0 Warning(s) 2017-02-23T08:24:36.9210662Z 2 Error(s) 2017-02-23T08:24:36.9210662Z Time Elapsed 00:00:00.43 2017-02-23T08:24:36.9366903Z ##[error]Unexpected exit code received from msbuild.exe: 1 2017-02-23T08:24:36.9679398Z Finishing task: VSBuild 2017-02-23T08:24:36.9835654Z ##[error]Task VSBuild failed. This caused the job to fail. Look at the logs for the task for more details. 

Anyone that have had this problem and got pass it?

We feel basically stuck atm!

Thanks in advance!

13
  • You need to install .net core SDK in TFS build agent. Commented Feb 22, 2017 at 16:22
  • @Venky - We are not running TeamCity, we are running TFS. And please read the post before answering... Commented Feb 22, 2017 at 16:23
  • You just need to wait for a few more days. On March 7 when Microsoft officially releases .NET Core SDK 1.0, your vendor should be able to provide you some support on building .NET Core projects based on that. The preview 2.1 you use is really out of date. Commented Feb 22, 2017 at 16:30
  • Could you share your build definition and detailed log? Have you installed .NET Core SDK version 1.0.0-preview2-1-003177 on your build agent machine? Commented Feb 23, 2017 at 8:00
  • 2
    What's the result if you build the project by using dotnet build? On the other hand, try to setup a build agent running as interactive mode, then queue build with this build agent and check the result. Commented Feb 24, 2017 at 8:27

2 Answers 2

1

This is not an issue after the release, was connect to the preview state in some way, not sure exactly what the wrong was. But it's not wrong anymore :)

Sign up to request clarification or add additional context in comments.

Comments

0

In the Team Foundation Server (TFS) build definition, add command line build steps to restore, build, test, pack, and publish routines. (They will be separate build steps, and test, pack, and publish will be needed for each VS Project).

This presumes of course you got the dotnet cli tools installed on the TFS Build Agents.

Basically, just mimic what you would do with at command line on your dev machine on the build server.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.