2
votes

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 version: 2.1.3 TFS version: 15.112.26307.0 Build definition: .NET Core (PREVIEW)

1
Can you build the .Net Core project successfully on the agent machine locally? What about other agents? You can try to deploy a new agent then check the issue again. Also check if the agent service account is in the local administrators group, if not , try adding it. - Andy Li-MSFT

1 Answers

0
votes

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

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.

You can download the latest version of the .NET Core SDK at https://www.microsoft.com/net/download/windows.