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)
Here is error log:
##[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
Here is my yaml file:
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
Please suggest, thanks in advance!