title: Azure DevOps dotnet test fails with ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
body: <p>I have AzureDevops pipeline to build and test my .net core Azure Functions solutions. Locally tests are working fine but they do fail on build Agent(I tried different agents)</p>
  
  <p>Here is error log:</p>
  
  <pre><code>##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
  ##[error]Dotnet command failed with non-zero exit code on the following projects : C:\BuildAgent\_work\20\s\UnitTestProject\UnitTestProject.csproj
  ##[section]Finishing: Test
  </code></pre>
  
  <p>Error:
  <a href="https://i.stack.imgur.com/i7nHV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i7nHV.png" alt="enter image description here"></a></p>
  
  <p>Here is my yaml file:</p>
  
  <pre><code>trigger:
  - dev
  
  pool: 'SelfHosted'
  
  variables:
    workingDirectory: '$(System.DefaultWorkingDirectory)/'
  
  steps:
  - task: DotNetCoreCLI@2
    displayName: Restore
    inputs:
      command: 'restore'
      projects: '**/*.csproj'
      feedsToUse: 'select'
  
  - task: DotNetCoreCLI@2
    displayName: Build
    inputs:
      command: 'build'
      projects: '**/*.csproj'
      arguments: '--output $(System.DefaultWorkingDirectory)/publish_output --configuration Release'
  
  - task: DotNetCoreCLI@2
    displayName: Test
    inputs:
      command: 'test'
      projects: '**/*.csproj'
      publishTestResults: false
  </code></pre>
  
  <p>Please suggest, thanks in advance!</p>